home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / mail / delivery / sendmail.002 / sendmail / sendmail-8.7.3-bin / sendmail-operation-manual.doc < prev    next >
Encoding:
Text File  |  1995-10-21  |  265.4 KB  |  7,261 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                           SSEENNDDMMAAIILL
  13.  
  14.               IINNSSTTAALLLLAATTIIOONN AANNDD OOPPEERRAATTIIOONN GGUUIIDDEE
  15.  
  16.                         Eric Allman
  17.              University of California, Berkeley
  18.                       Mammoth Project
  19.                     eric@CS.Berkeley.EDU
  20.  
  21.                         Version 8.67
  22.  
  23.                   For Sendmail Version 8.7
  24.  
  25.  
  26.  
  27.  
  28.      _S_e_n_d_m_a_i_l implements a general purpose internetwork mail
  29. routing facility under the UNIX(R) operating system.  It  is
  30. not  tied  to any one transport protocol -- its function may
  31. be likened to a crossbar switch, relaying messages from  one
  32. domain  into  another.   In the process, it can do a limited
  33. amount of message header editing to put the message  into  a
  34. format that is appropriate for the receiving domain.  All of
  35. this is done under the control of a configuration file.
  36.  
  37.      Due to the requirements of  flexibility  for  _s_e_n_d_m_a_i_l,
  38. the  configuration  file  can  seem somewhat unapproachable.
  39. However, there are only a few basic configurations for  most
  40. sites, for which standard configuration files have been sup-
  41. plied.  Most other configurations can be built by  adjusting
  42. an existing configuration files incrementally.
  43.  
  44.      _S_e_n_d_m_a_i_l is based on RFC821 (Simple Mail Transport Pro-
  45. tocol), RFC822  (Internet  Mail  Format  Protocol),  RFC1123
  46. (Internet  Host Requirements), RFC1521 (MIME), RFC1651 (SMTP
  47. Service Extensions), and a series of as-yet-draft  standards
  48. describing  Delivery  Status Notifications (DSNs), available
  49. from the internet drafts  sites  as  draft-ietf-notary-mime-
  50. delivery-_X_X.txt,       draft-ietf-notary-mime-report-_X_X.txt,
  51. draft-ietf-notary-smtp-drpt-_X_X.txt,  and  draft-ietf-notary-
  52. status-_X_X.txt (replace _X_X by the latest draft number).  How-
  53. ever, since _s_e_n_d_m_a_i_l is designed to work in a  wider  world,
  54. in  many  cases  it can be configured to exceed these proto-
  55. cols.  These cases are described herein.
  56.  
  57.      Although _s_e_n_d_m_a_i_l is intended to run without  the  need
  58. for monitoring, it has a number of features that may be used
  59. to monitor or adjust the  operation  under  unusual  circum-
  60. stances.  These features are described.
  61.  
  62.  
  63. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee           SSMMMM::0088--11
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. SSMMMM::0088--22           SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  72.  
  73.  
  74.      Section  one  describes  how  to  do  a  basic _s_e_n_d_m_a_i_l
  75. installation.  Section two explains the day-to-day  informa-
  76. tion  you  should know to maintain your mail system.  If you
  77. have a relatively normal site,  these  two  sections  should
  78. contain  sufficient  information for you to install _s_e_n_d_m_a_i_l
  79. and keep it happy.  Section three describes some  parameters
  80. that  may  be  safely tweaked.  Section four has information
  81. regarding the command line arguments.  Section five contains
  82. the  nitty-gritty  information about the configuration file.
  83. This section is for masochists and  people  who  must  write
  84. their own configuration file.  Section six describes config-
  85. uration that can be done at  compile  time.   Section  seven
  86. gives  a brief description of differences in this version of
  87. _s_e_n_d_m_a_i_l.  The appendixes give a brief but detailed explana-
  88. tion  of  a  number of features not described in the rest of
  89. the paper.
  90.  
  91.      WWAARRNNIINNGG:: Several major changes were introduced in  ver-
  92. sion  8.7.   You should not attempt to use this document for
  93. prior versions of _s_e_n_d_m_a_i_l.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee           SSMMMM::0088--77
  138.  
  139.  
  140. 11..  BBAASSIICC IINNSSTTAALLLLAATTIIOONN
  141.  
  142.         There are two basic steps  to  installing  _s_e_n_d_m_a_i_l.
  143.    The  hard part is to build the configuration table.  This
  144.    is a file that _s_e_n_d_m_a_i_l reads  when  it  starts  up  that
  145.    describes  the  mailers  it  knows  about,  how  to parse
  146.    addresses, how to rewrite the  message  header,  and  the
  147.    settings  of various options.  Although the configuration
  148.    table is quite complex, a configuration  can  usually  be
  149.    built  by  adjusting an existing off-the-shelf configura-
  150.    tion.  The second part is actually  doing  the  installa-
  151.    tion, i.e., creating the necessary files, etc.
  152.  
  153.         The  remainder  of  this  section  will describe the
  154.    installation of _s_e_n_d_m_a_i_l assuming you can use one of  the
  155.    existing  configurations  and that the standard installa-
  156.    tion parameters are acceptable.  All pathnames and  exam-
  157.    ples  are  given  from  the root of the _s_e_n_d_m_a_i_l subtree,
  158.    normally _/_u_s_r_/_s_r_c_/_u_s_r_._s_b_i_n_/_s_e_n_d_m_a_i_l on 4.4BSD.
  159.  
  160.         If you are loading this off the tape, continue  with
  161.    the  next  section.  If you have a running binary already
  162.    on your system, you should probably skip to section  1.2.
  163.  
  164.    11..11..  CCoommppiilliinngg SSeennddmmaaiill
  165.  
  166.            All  _s_e_n_d_m_a_i_l  source is in the _s_r_c subdirectory.
  167.       If you are running on a 4.4BSD system, compile by typ-
  168.       ing  "make".   On  other systems, you may have to make
  169.       some other adjustments.  On most systems, you  can  do
  170.       the appropriate compilation by typing
  171.  
  172.           sh makesendmail
  173.  
  174.       This  will  leave the binary in an appropriately named
  175.       subdirectory.  It works for multiple  object  versions
  176.       compiled out of the same directory.
  177.  
  178.       11..11..11..  TTwweeaakkiinngg tthhee MMaakkeeffiillee
  179.  
  180.               _S_e_n_d_m_a_i_l  supports  two  different formats for
  181.          the local (on disk) version of  databases,  notably
  182.          the _a_l_i_a_s_e_s database.  At least one of these should
  183.          be defined if at all possible.
  184.  
  185.          NDBM      The  ``new  DBM''  format,  available  on
  186.                    nearly  all  systems  around today.  This
  187.                    was the preferred format prior to 4.4BSD.
  188.                    It allows such complex things as multiple
  189.                    databases and closing  a  currently  open
  190.                    database.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. SSMMMM::0088--88           SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  204.  
  205.  
  206.          NEWDB     The  new  database package from Berkeley.
  207.                    If you have this, use it.  It allows long
  208.                    records,  multiple  open  databases, real
  209.                    in-memory caching, and so forth.  You can
  210.                    define  this  in  conjunction with one of
  211.                    the other two; if you do,  old  databases
  212.                    are read, but when a new database is cre-
  213.                    ated it will be in NEWDB  format.   As  a
  214.                    nasty  hack, if you have NEWDB, NDBM, and
  215.                    NIS defined, and if the alias  file  name
  216.                    includes  the  substring "/yp/", _s_e_n_d_m_a_i_l
  217.                    will create both new and old versions  of
  218.                    the alias file during a _n_e_w_a_l_i_a_s command.
  219.                    This is required because the  Sun  NIS/YP
  220.                    system reads the DBM version of the alias
  221.                    file.  It's ugly as sin, but it works.
  222.  
  223.          If neither of these are defined, _s_e_n_d_m_a_i_l reads the
  224.          alias  file  into memory on every invocation.  This
  225.          can be slow and should be avoided.  There are  also
  226.          several methods for remote database access:
  227.  
  228.          NIS       Sun's  Network Information Services (for-
  229.                    merly YP).
  230.  
  231.          NISPLUS   Sun's NIS+ services.
  232.  
  233.          NETINFO   NeXT's NetInfo service.
  234.  
  235.          HESIOD    Hesiod service (from Athena).
  236.  
  237.          Other compilation  flags  are  set  in  conf.h  and
  238.          should be predefined for you unless you are porting
  239.          to a new environment.
  240.  
  241.       11..11..22..  CCoommppiillaattiioonn aanndd iinnssttaallllaattiioonn
  242.  
  243.               After making the  local  system  configuration
  244.          described  above, You should be able to compile and
  245.          install the system.  The script  "makesendmail"  is
  246.          the best approach on most systems:
  247.  
  248.              sh makesendmail
  249.  
  250.          This  will use _u_n_a_m_e(1) to select the correct Make-
  251.          file for your environment.
  252.  
  253.               You may be able to install using
  254.  
  255.              sh makesendmail install
  256.  
  257.          This should install the  binary  in  /usr/sbin  and
  258.          create    links    from   /usr/bin/newaliases   and
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee           SSMMMM::0088--99
  270.  
  271.  
  272.          /usr/bin/mailq to  /usr/sbin/sendmail.   On  4.4BSD
  273.          systems  it will also format and install man pages.
  274.  
  275.    11..22..  CCoonnffiigguurraattiioonn FFiilleess
  276.  
  277.            _S_e_n_d_m_a_i_l cannot operate without  a  configuration
  278.       file.   The  configuration  defines  the mail delivery
  279.       mechanisms understood at  this  site,  how  to  access
  280.       them, how to forward email to remote mail systems, and
  281.       a number of  tuning  parameters.   This  configuration
  282.       file  is  detailed  in the later portion of this docu-
  283.       ment.
  284.  
  285.            The _s_e_n_d_m_a_i_l configuration  can  be  daunting  at
  286.       first.   The world is complex, and the mail configura-
  287.       tion reflects  that.   The  distribution  includes  an
  288.       m4-based configuration package that hides a lot of the
  289.       complexity.
  290.  
  291.            These configuration files are  simpler  than  old
  292.       versions largely because the world has become simpler;
  293.       in particular, text-based host  files  are  officially
  294.       eliminated,  obviating the need to "hide" hosts behind
  295.       a registered internet gateway.
  296.  
  297.            These files also assume that most of your  neigh-
  298.       bors   use  domain-based  UUCP  addressing;  that  is,
  299.       instead of naming hosts as "host!user" they  will  use
  300.       "host.domain!user".   The  configuration  files can be
  301.       customized to work around this, but it  is  more  com-
  302.       plex.
  303.  
  304.            Our  configuration  files  are processed by _m_4 to
  305.       facilitate local customization; the  directory  _c_f  of
  306.       the   _s_e_n_d_m_a_i_l  distribution  directory  contains  the
  307.       source files.  This directory contains several  subdi-
  308.       rectories:
  309.  
  310.       cf        Both   site-dependent  and  site-independent
  311.                 descriptions of hosts.  These can be literal
  312.                 host  names  (e.g.,  "ucbvax.mc")  when  the
  313.                 hosts are gateways or more general  descrip-
  314.                 tions  (such  as  "tcpproto.mc" as a general
  315.                 description of  an  SMTP-connected  host  or
  316.                 "uucpproto.mc" as a general description of a
  317.                 UUCP-connected  host).   Files  ending   ..mmcc
  318.                 (``Master  Configuration'')  are  the  input
  319.                 descriptions; the output is  in  the  corre-
  320.                 sponding ..ccff file.  The general structure of
  321.                 these files is described below.
  322.  
  323.       domain    Site-dependent    subdomain    descriptions.
  324.                 These  are tied to the way your organization
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335. SSMMMM::0088--1100          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  336.  
  337.  
  338.                 wants  to  do  addressing.    For   example,
  339.                 ddoommaaiinn//ccss..eexxppoosseedd..mm44  is our description for
  340.                 hosts in the CS.Berkeley.EDU subdomain  that
  341.                 want  their individual hostname to be exter-
  342.                 nally visible;  ddoommaaiinn//ccss..hhiiddddeenn..mm44  is  the
  343.                 same  except  that  the  hostname  is hidden
  344.                 (everything  looks  like   it   comes   from
  345.                 CS.Berkeley.EDU).    These   are  referenced
  346.                 using the DOMAIN mm44 macro in the ..mmcc file.
  347.  
  348.       feature   Definitions of specific features  that  some
  349.                 particular  host  in  your  site might want.
  350.                 These are referenced using  the  FEATURE  mm44
  351.                 macro.   An  example  feature is use_cw_file
  352.                 (which   tells   _s_e_n_d_m_a_i_l   to    read    an
  353.                 /etc/sendmail.cw file on startup to find the
  354.                 set of local names).
  355.  
  356.       hack      Local hacks, referenced using  the  HACK  mm44
  357.                 macro.   Try  to  avoid these.  The point of
  358.                 having them here is to make  it  clear  that
  359.                 they smell.
  360.  
  361.       m4        Site-independent  _m_4(1)  include  files that
  362.                 have information common to all configuration
  363.                 files.    This   can  be  thought  of  as  a
  364.                 "#include" directory.
  365.  
  366.       mailer    Definitions of mailers, referenced using the
  367.                 MAILER  mm44 macro.  The mailer types that are
  368.                 known in this distribution are  fax,  local,
  369.                 smtp,  uucp,  and  usenet.   For example, to
  370.                 include support for the UUCP-based  mailers,
  371.                 use "MAILER(uucp)".
  372.  
  373.       ostype    Definitions   describing  various  operating
  374.                 system environments (such as the location of
  375.                 support  files).  These are referenced using
  376.                 the OSTYPE mm44 macro.
  377.  
  378.       sh        Shell files used by the  mm44  build  process.
  379.                 You shouldn't have to mess with these.
  380.  
  381.       siteconfig
  382.                 Local  site  configuration information, such
  383.                 as UUCP connectivity.  They normally contain
  384.                 lists of site information, for example:
  385.  
  386.                     SITE(contessa)
  387.                     SITE(hoptoad)
  388.                     SITE(nkainc)
  389.                     SITE(well)
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--1111
  402.  
  403.  
  404.                 They  are  referenced  using  the SITECONFIG
  405.                 macro:
  406.  
  407.                     SITECONFIG(site.config.file, name_of_site, X)
  408.  
  409.                 where _X is the macro/class name to use.   It
  410.                 can   be  U  (indicating  locally  connected
  411.                 hosts) or one of W, X, or Y for up to  three
  412.                 remote UUCP hubs.
  413.  
  414.            If you are in a new domain (e.g., a company), you
  415.       will probably want to create a cf/domain file for your
  416.       domain.  This consists primarily of relay definitions:
  417.       for  example,  Berkeley's  domain  definition  defines
  418.       relays  for  BitNET,  CSNET, and UUCP.  Of these, only
  419.       the UUCP relay is particularly specific  to  Berkeley.
  420.       All  of these are internet-style domain names.  Please
  421.       check to make certain they  are  reasonable  for  your
  422.       domain.
  423.  
  424.            Subdomains  at  Berkeley  are also represented in
  425.       the cf/domain directory.  For example, the domain  cs-
  426.       exposed  is  the  Computer  Science subdomain with the
  427.       local hostname shown to other users;  cs-hidden  makes
  428.       users  appear to be from the CS.Berkeley.EDU subdomain
  429.       (with no local host information included).   You  will
  430.       probably have to update this directory to be appropri-
  431.       ate for your domain.
  432.  
  433.            You will have to use or create ..mmcc files  in  the
  434.       _c_f_/_c_f  subdirectory  for your hosts.  This is detailed
  435.       in the cf/README file.
  436.  
  437.    11..33..  DDeettaaiillss ooff IInnssttaallllaattiioonn FFiilleess
  438.  
  439.            This subsection describes the files that comprise
  440.       the _s_e_n_d_m_a_i_l installation.
  441.  
  442.       11..33..11..  //uussrr//ssbbiinn//sseennddmmaaiill
  443.  
  444.               The   binary   for   _s_e_n_d_m_a_i_l  is  located  in
  445.          /usr/sbin1.  It should be setuid root.   For  secu-
  446.          rity  reasons,  /,  /usr,  and  /usr/sbin should be
  447.          owned by root, mode 7552.
  448. ____________________
  449.    1This is usually /usr/sbin on 4.4BSD and  newer  systems;
  450. many  systems install it in /usr/lib.  I understand it is in
  451. /usr/ucblib on System V Release 4.
  452.    2Some vendors ship them owned by bin; this creates a  se-
  453. curity hole that is not actually related to _s_e_n_d_m_a_i_l.  Other
  454. important directories that should  have  restrictive  owner-
  455. ships  and  permissions  are /bin, /usr/bin, /etc, /usr/etc,
  456. /lib, and /usr/lib.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467. SSMMMM::0088--1122          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  468.  
  469.  
  470.       11..33..22..  //eettcc//sseennddmmaaiill..ccff
  471.  
  472.               This is the configuration file for  _s_e_n_d_m_a_i_l3.
  473.          This and /etc/sendmail.pid are the only non-library
  474.          file names compiled into _s_e_n_d_m_a_i_l4.
  475.  
  476.               The configuration  file  is  normally  created
  477.          using  the  distribution files described above.  If
  478.          you have a particularly unusual  system  configura-
  479.          tion you may need to create a special version.  The
  480.          format of this file is detailed in  later  sections
  481.          of this document.
  482.  
  483.       11..33..33..  //uussrr//bbiinn//nneewwaalliiaasseess
  484.  
  485.               The  _n_e_w_a_l_i_a_s_e_s  command should just be a link
  486.          to _s_e_n_d_m_a_i_l:
  487.  
  488.              rm -f /usr/bin/newaliases
  489.              ln -s /usr/sbin/sendmail /usr/bin/newaliases
  490.  
  491.          This can be installed in whatever search  path  you
  492.          prefer for your system.
  493.  
  494.       11..33..44..  //vvaarr//ssppooooll//mmqquueeuuee
  495.  
  496.               The directory _/_v_a_r_/_s_p_o_o_l_/_m_q_u_e_u_e should be cre-
  497.          ated to hold the mail queue.  This directory should
  498.          be mode 700 and owned by root.
  499.  
  500.               The  actual  path of this directory is defined
  501.          in the QQ option of the _s_e_n_d_m_a_i_l_._c_f file.
  502.  
  503.       11..33..55..  //eettcc//aalliiaasseess**
  504.  
  505.               The system aliases are held in "/etc/aliases".
  506.          A  sample  is given in "lib/aliases" which includes
  507.          some aliases which _m_u_s_t be defined:
  508.  
  509.              cp lib/aliases /etc/aliases
  510.              _e_d_i_t _/_e_t_c_/_a_l_i_a_s_e_s
  511.  
  512. ____________________
  513.    3Actually, the pathname varies depending on the operating
  514. system; /etc is the preferred directory.  Some older systems
  515. install it in //uussrr//lliibb//sseennddmmaaiill..ccff, and I've also seen it in
  516. //uussrr//uuccbblliibb and //eettcc//mmaaiill.  If you want to move  this  file,
  517. change _s_r_c_/_c_o_n_f_._h.
  518.    4The system libraries can reference other files; in  par-
  519. ticular,  system  library  subroutines  that  _s_e_n_d_m_a_i_l calls
  520. probably reference _/_e_t_c_/_p_a_s_s_w_d and _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f.
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--1133
  534.  
  535.  
  536.          You should extend this file with any  aliases  that
  537.          are apropos to your system.
  538.  
  539.               Normally  _s_e_n_d_m_a_i_l looks at a version of these
  540.          files maintained by the _d_b_m(3) or  _d_b(3)  routines.
  541.          These  are  stored either in "/etc/aliases.dir" and
  542.          "/etc/aliases.pag" or  "/etc/aliases.db"  depending
  543.          on which database package you are using.  These can
  544.          initially be created as empty files, but they  will
  545.          have  to  be initialized promptly.  These should be
  546.          mode 644:
  547.  
  548.              cp /dev/null /etc/aliases.dir
  549.              cp /dev/null /etc/aliases.pag
  550.              chmod 644 /etc/aliases.*
  551.              newaliases
  552.  
  553.          The _d_b routines preset the mode reasonably, so this
  554.          step  can be skipped.  The actual path of this file
  555.          is defined in the AA option of the _s_e_n_d_m_a_i_l_._c_f file.
  556.  
  557.       11..33..66..  //eettcc//rrcc
  558.  
  559.               It  will be necessary to start up the _s_e_n_d_m_a_i_l
  560.          daemon when your system reboots.  This daemon  per-
  561.          forms  two functions: it listens on the SMTP socket
  562.          for connections (to receive mail from a remote sys-
  563.          tem)  and  it  processes  the queue periodically to
  564.          insure that mail gets delivered when hosts come up.
  565.  
  566.               Add  the  following  lines  to  "/etc/rc"  (or
  567.          "/etc/rc.local" as appropriate) in the  area  where
  568.          it is starting up the daemons:
  569.  
  570.              if [ -f /usr/sbin/sendmail -a -f /etc/sendmail.cf ]; then
  571.                   (cd /var/spool/mqueue; rm -f [lnx]f*)
  572.                   /usr/sbin/sendmail -bd -q30m &
  573.                   echo -n ' sendmail' >/dev/console
  574.              fi
  575.  
  576.          The  "cd"  and  "rm"  commands insure that all lock
  577.          files have been removed; extraneous lock files  may
  578.          be  left around if the system goes down in the mid-
  579.          dle of processing a message.  The line  that  actu-
  580.          ally  invokes  _s_e_n_d_m_a_i_l has two flags: "-bd" causes
  581.          it to listen on the SMTP port, and  "-q30m"  causes
  582.          it to run the queue every half hour.
  583.  
  584.               Some people use a more complex startup script,
  585.          removing zero length qf  files  and  df  files  for
  586.          which there is no qf file.  For example, see Figure
  587.          1 for an example of a complex startup script.
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599. SSMMMM::0088--1144          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  600.  
  601.  
  602.  
  603. ____________________________________________________________
  604.  
  605. # remove zero length qf files
  606. for qffile in qf*
  607. do
  608.      if [ -r $qffile ]
  609.      then
  610.           if [ ! -s $qffile ]
  611.           then
  612.                echo -n " <zero: $qffile>" > /dev/console
  613.                rm -f $qffile
  614.           fi
  615.      fi
  616. done
  617. # rename tf files to be qf if the qf does not exist
  618. for tffile in tf*
  619. do
  620.      qffile=`echo $tffile | sed 's/t/q/'`
  621.      if [ -r $tffile -a ! -f $qffile ]
  622.      then
  623.           echo -n " <recovering: $tffile>" > /dev/console
  624.           mv $tffile $qffile
  625.      else
  626.           echo -n " <extra: $tffile>" > /dev/console
  627.           rm -f $tffile
  628.      fi
  629. done
  630. # remove df files with no corresponding qf files
  631. for dffile in df*
  632. do
  633.      qffile=`echo $dffile | sed 's/d/q/'`
  634.      if [ -r $dffile -a ! -f $qffile ]
  635.      then
  636.           echo -n " <incomplete: $dffile>" > /dev/console
  637.           mv $dffile `echo $dffile | sed 's/d/D/'`
  638.      fi
  639. done
  640. # announce files that have been saved during disaster recovery
  641. for xffile in [A-Z]f*
  642. do
  643.      echo -n " <panic: $xffile>" > /dev/console
  644. done
  645.  
  646.             Figure 1 -- A complex startup script
  647. ____________________________________________________________
  648.  
  649.  
  650.               If you are not running a version of UNIX  that
  651.          supports  Berkeley  TCP/IP,  do not include the --bbdd
  652.          flag.
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--1155
  666.  
  667.  
  668.       11..33..77..  //uussrr//lliibb//sseennddmmaaiill..hhff
  669.  
  670.               This is the help file used by  the  SMTP  HHEELLPP
  671.          command.      It     should    be    copied    from
  672.          "lib/sendmail.hf":
  673.  
  674.              cp lib/sendmail.hf /usr/lib
  675.  
  676.          The actual path of this file is defined  in  the  HH
  677.          option of the _s_e_n_d_m_a_i_l_._c_f file.
  678.  
  679.       11..33..88..  //eettcc//sseennddmmaaiill..sstt
  680.  
  681.               If  you  wish to collect statistics about your
  682.          mail  traffic,   you   should   create   the   file
  683.          "/etc/sendmail.st":
  684.  
  685.              cp /dev/null /etc/sendmail.st
  686.              chmod 666 /etc/sendmail.st
  687.  
  688.          This  file  does  not grow.  It is printed with the
  689.          program "mailstats/mailstats.c."  The  actual  path
  690.          of  this  file  is  defined  in the SS option of the
  691.          _s_e_n_d_m_a_i_l_._c_f file.
  692.  
  693.       11..33..99..  //uussrr//bbiinn//mmaaiillqq
  694.  
  695.               If _s_e_n_d_m_a_i_l is invoked  as  "mailq,"  it  will
  696.          simulate  the  --bbpp  flag (i.e., _s_e_n_d_m_a_i_l will print
  697.          the contents of the mail queue; see  below).   This
  698.          should be a link to /usr/sbin/sendmail.
  699.  
  700. 22..  NNOORRMMAALL OOPPEERRAATTIIOONNSS
  701.  
  702.    22..11..  TThhee SSyysstteemm LLoogg
  703.  
  704.            The  system  log  is  supported by the _s_y_s_l_o_g_d(8)
  705.       program.  All messages from _s_e_n_d_m_a_i_l are logged  under
  706.       the LOG_MAIL facility5.
  707.  
  708.       22..11..11..  FFoorrmmaatt
  709.  
  710.               Each line in the  system  log  consists  of  a
  711.          timestamp,  the  name of the machine that generated
  712.          it (for logging  from  several  machines  over  the
  713.          local  area  network),  the word "sendmail:", and a
  714.  
  715.  
  716. ____________________
  717.    5Except  on  Ultrix, which does not support facilities in
  718. the syslog.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731. SSMMMM::0088--1166          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  732.  
  733.  
  734.          message6.    Most   messages   are  a  sequence  of
  735.          _n_a_m_e=_v_a_l_u_e pairs.
  736.  
  737.               The two most common lines are  logged  when  a
  738.          message  is  processed.  The first logs the receipt
  739.          of a message; there will be exactly  one  of  these
  740.          per message.  Some fields may be omitted if they do
  741.          not contain interesting information.  Fields are:
  742.  
  743.          from      The envelope sender address.
  744.  
  745.          size      The size of the message in bytes.
  746.  
  747.          class     The class (i.e., numeric  precedence)  of
  748.                    the message.
  749.  
  750.          pri       The  initial  message  priority (used for
  751.                    queue sorting).
  752.  
  753.          nrcpts    The number  of  envelope  recipients  for
  754.                    this message (after aliasing and forward-
  755.                    ing).
  756.  
  757.          msgid     The message id of the message  (from  the
  758.                    header).
  759.  
  760.          proto     The protocol used to receive this message
  761.                    (e.g., ESMTP or UUCP)
  762.  
  763.          relay     The machine from which it was received.
  764.  
  765.          There is also one line logged per delivery  attempt
  766.          (so there can be several per message if delivery is
  767.          deferred or there are multiple recipients).  Fields
  768.          are:
  769.  
  770.          to        A  comma-separated list of the recipients
  771.                    to this mailer.
  772.  
  773.          ctladdr   The ``controlling user'',  that  is,  the
  774.                    name of the user whose credentials we use
  775.                    for delivery.
  776.  
  777.          delay     The total delay  between  the  time  this
  778.                    message  was received and the time it was
  779.                    delivered.
  780.  
  781.          xdelay    The amount of time needed in this  deliv-
  782.                    ery  attempt  (normally indicative of the
  783. ____________________
  784.    6This format may vary slightly if your vendor has changed
  785. the syntax.
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--1177
  798.  
  799.  
  800.                    speed of the connection).
  801.  
  802.          mailer    The name of the mailer used to deliver to
  803.                    this recipient.
  804.  
  805.          relay     The   name  of  the  host  that  actually
  806.                    accepted (or rejected) this recipient.
  807.  
  808.          stat      The delivery status.
  809.  
  810.          Not all fields are present  in  all  messages;  for
  811.          example, the relay is not listed for local deliver-
  812.          ies.
  813.  
  814.       22..11..22..  LLeevveellss
  815.  
  816.               If  you  have  _s_y_s_l_o_g_d(8)  or  an   equivalent
  817.          installed,  you  will be able to do logging.  There
  818.          is a  large  amount  of  information  that  can  be
  819.          logged.   The  log  is  arranged as a succession of
  820.          levels.  At the lowest level only extremely strange
  821.          situations  are logged.  At the highest level, even
  822.          the  most  mundane  and  uninteresting  events  are
  823.          recorded  for posterity.  As a convention, log lev-
  824.          els under ten are  considered  generally  "useful;"
  825.          log levels above 64 are reserved for debugging pur-
  826.          poses.  Levels from 11-64 are reserved for  verbose
  827.          information that some sites might want.
  828.  
  829.               A  complete  description  of the log levels is
  830.          given in section 4.6.
  831.  
  832.    22..22..  DDuummppiinngg SSttaattee
  833.  
  834.            You can ask _s_e_n_d_m_a_i_l to log a dump  of  the  open
  835.       files and the connection cache by sending it a SIGUSR1
  836.       signal.  The results are logged at LOG_DEBUG priority.
  837.  
  838.    22..33..  TThhee MMaaiill QQuueeuuee
  839.  
  840.            Sometimes  a host cannot handle a message immedi-
  841.       ately.  For example, it may  be  down  or  overloaded,
  842.       causing it to refuse connections.  The sending host is
  843.       then expected to save this message in its  mail  queue
  844.       and attempt to deliver it later.
  845.  
  846.            Under  normal  conditions  the mail queue will be
  847.       processed transparently.  However, you may  find  that
  848.       manual intervention is sometimes necessary.  For exam-
  849.       ple, if a major host is down for a period of time  the
  850.       queue  may become clogged.  Although _s_e_n_d_m_a_i_l ought to
  851.       recover gracefully when the host  comes  up,  you  may
  852.       find performance unacceptably bad in the meantime.
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863. SSMMMM::0088--1188          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  864.  
  865.  
  866.       22..33..11..  PPrriinnttiinngg tthhee qquueeuuee
  867.  
  868.               The contents of the queue can be printed using
  869.          the _m_a_i_l_q command (or by specifying the --bbpp flag to
  870.          _s_e_n_d_m_a_i_l):
  871.  
  872.              mailq
  873.  
  874.          This  will produce a listing of the queue id's, the
  875.          size of the message, the date the  message  entered
  876.          the queue, and the sender and recipients.
  877.  
  878.       22..33..22..  FFoorrcciinngg tthhee qquueeuuee
  879.  
  880.               _S_e_n_d_m_a_i_l should run the queue automatically at
  881.          intervals.  The algorithm is to read and  sort  the
  882.          queue,  and  then to attempt to process all jobs in
  883.          order.  When it attempts to run the  job,  _s_e_n_d_m_a_i_l
  884.          first  checks  to see if the job is locked.  If so,
  885.          it ignores the job.
  886.  
  887.               There is no attempt to insure  that  only  one
  888.          queue  processor exists at any time, since there is
  889.          no guarantee that a job cannot take forever to pro-
  890.          cess  (however, _s_e_n_d_m_a_i_l does include heuristics to
  891.          try to abort jobs that are taking absurd amounts of
  892.          time;  technically,  this  violates RFC 821, but is
  893.          blessed by RFC 1123).  Due  to  the  locking  algo-
  894.          rithm,  it  is impossible for one job to freeze the
  895.          entire queue.  However, an uncooperative  recipient
  896.          host  or a program recipient that never returns can
  897.          accumulate many processes in your system.  Unfortu-
  898.          nately, there is no completely general way to solve
  899.          this.
  900.  
  901.               In some cases, you may find that a major  host
  902.          going  down  for a couple of days may create a pro-
  903.          hibitively large queue.  This will result in  _s_e_n_d_-
  904.          _m_a_i_l  spending an inordinate amount of time sorting
  905.          the queue.  This situation can be fixed  by  moving
  906.          the  queue  to a temporary place and creating a new
  907.          queue.  The old queue can be  run  later  when  the
  908.          offending host returns to service.
  909.  
  910.               To  do  this,  it  is  acceptable  to move the
  911.          entire queue directory:
  912.  
  913.              cd /var/spool
  914.              mv mqueue omqueue; mkdir mqueue; chmod 700 mqueue
  915.  
  916.          You should then kill the existing daemon (since  it
  917.          will  still  be  processing in the old queue direc-
  918.          tory) and create a new daemon.
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--1199
  930.  
  931.  
  932.               To run the old mail queue, run  the  following
  933.          command:
  934.  
  935.              /usr/sbin/sendmail -oQ/var/spool/omqueue -q
  936.  
  937.          The --ooQQ flag specifies an alternate queue directory
  938.          and the --qq flag says to just run every job  in  the
  939.          queue.   If  you  have a tendency toward voyeurism,
  940.          you can use the --vv flag to watch what is going  on.
  941.  
  942.               When  the  queue  is  finally emptied, you can
  943.          remove the directory:
  944.  
  945.              rmdir /var/spool/omqueue
  946.  
  947.  
  948.    22..44..  TThhee SSeerrvviiccee SSwwiittcchh
  949.  
  950.            The implementation  of  certain  system  services
  951.       such as host and user name lookup is controlled by the
  952.       service switch.  If the host operating system supports
  953.       such  a  switch  _s_e_n_d_m_a_i_l will use the native version.
  954.       Ultrix, Solaris, and DEC OSF/1 are  examples  of  such
  955.       systems.
  956.  
  957.            If  the underlying operating system does not sup-
  958.       port a service switch (e.g., SunOS, HP-UX,  BSD)  then
  959.       _s_e_n_d_m_a_i_l will provide a stub implementation.  The SSeerr--
  960.       vviicceeSSwwiittcchhFFiillee option points to the  name  of  a  file
  961.       that  has  the  service  definitions Each line has the
  962.       name of a service and the possible implementations  of
  963.       that service.  For example, the file:
  964.  
  965.           hosts     dns files nis
  966.           aliases   files nis
  967.  
  968.       will ask _s_e_n_d_m_a_i_l to look for hosts in the Domain Name
  969.       System first.  If  the  requested  host  name  is  not
  970.       found,  it  tries  local  files,  and if that fails it
  971.       tries NIS.  Similarly, when  looking  for  aliases  it
  972.       will try the local files first followed by NIS.
  973.  
  974.            Service  switches  are not completely integrated.
  975.       For example, despite the  fact  that  the  host  entry
  976.       listed  in the above example specifies to look in NIS,
  977.       on SunOS this won't happen because the  system  imple-
  978.       mentation of _g_e_t_h_o_s_t_b_y_n_a_m_e(3) doesn't understand this.
  979.       If there is enough  demand  _s_e_n_d_m_a_i_l  may  reimplement
  980.       _g_e_t_h_o_s_t_b_y_n_a_m_e(3),  _g_e_t_h_o_s_t_b_y_a_d_d_r(3),  _g_e_t_p_w_e_n_t(3), and
  981.       the other system routines that would be  necessary  to
  982.       make this work seamlessly.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995. SSMMMM::0088--2200          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  996.  
  997.  
  998.    22..55..  TThhee AAlliiaass DDaattaabbaassee
  999.  
  1000.            The alias database exists in two forms.  One is a
  1001.       text form, maintained in the file  _/_e_t_c_/_a_l_i_a_s_e_s_.   The
  1002.       aliases are of the form
  1003.  
  1004.           name: name1, name2, ...
  1005.  
  1006.       Only local names may be aliased; e.g.,
  1007.  
  1008.           eric@prep.ai.MIT.EDU: eric@CS.Berkeley.EDU
  1009.  
  1010.       will   not   have   the   desired  effect  (except  on
  1011.       prep.ai.MIT.EDU, and they probably  don't  want  me)7.
  1012.       Aliases  may be continued by starting any continuation
  1013.       lines with a space or a tab.  Blank  lines  and  lines
  1014.       beginning with a sharp sign ("#") are comments.
  1015.  
  1016.            The  second  form is processed by the _n_d_b_m(3)8 or
  1017.       _d_b(3)  library.    This   form   is   in   the   files
  1018.       _/_e_t_c_/_a_l_i_a_s_e_s_._d_i_r  and  _/_e_t_c_/_a_l_i_a_s_e_s_._p_a_g_.   This is the
  1019.       form that _s_e_n_d_m_a_i_l actually uses to  resolve  aliases.
  1020.       This technique is used to improve performance.
  1021.  
  1022.            The  control  of  search order is actually set by
  1023.       the service switch.  Essentially, the entry
  1024.  
  1025.           OAswitch:aliases
  1026.  
  1027.       is always added as the first alias  entry;  also,  the
  1028.       first  alias  file name without a class (e.g., without
  1029.       "nis:" on the front) will be used as the name  of  the
  1030.       file for a ``files'' entry in the aliases switch.  For
  1031.       example, if the configuration file contains
  1032.  
  1033.           OA/etc/aliases
  1034.  
  1035.       and the service switch contains
  1036.  
  1037.           aliases   nis files nisplus
  1038.  
  1039.       then  aliases  will  first  be  searched  in  the  NIS
  1040.       database,  then  in  /etc/aliases,  then  in  the NIS+
  1041.       database.
  1042.  
  1043.  
  1044. ____________________
  1045.    7Actually, any mailer that has the `A'  mailer  flag  set
  1046. will  permit aliasing; this is normally limited to the local
  1047. mailer.
  1048.    8The _g_d_b_m package probably works as well.
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--2211
  1062.  
  1063.  
  1064.            You can also  use  NIS-based  alias  files.   For
  1065.       example, the specification:
  1066.  
  1067.           OA/etc/aliases
  1068.           OAnis:mail.aliases@my.nis.domain
  1069.  
  1070.       will  first  search the /etc/aliases file and then the
  1071.       map named "mail.aliases" in "my.nis.domain".  Warning:
  1072.       if  you  build your own NIS-based alias files, be sure
  1073.       to provide the --ll flag to _m_a_k_e_d_b_m(8) to map upper case
  1074.       letters  in the keys to lower case; otherwise, aliases
  1075.       with upper case letters in  their  names  won't  match
  1076.       incoming addresses.
  1077.  
  1078.            Additional  flags  can  be  added after the colon
  1079.       exactly like a KK line -- for example:
  1080.  
  1081.           OAnis:-N mail.aliases@my.nis.domain
  1082.  
  1083.       will search the appropriate NIS map and always include
  1084.       null bytes in the key.
  1085.  
  1086.       22..55..11..  RReebbuuiillddiinngg tthhee aalliiaass ddaattaabbaassee
  1087.  
  1088.               The  DB  or DBM version of the database may be
  1089.          rebuilt explicitly by executing the command
  1090.  
  1091.              newaliases
  1092.  
  1093.          This is equivalent to giving _s_e_n_d_m_a_i_l the --bbii flag:
  1094.  
  1095.              /usr/sbin/sendmail -bi
  1096.  
  1097.  
  1098.               If the RReebbuuiillddAAlliiaasseess (old DD) option is speci-
  1099.          fied in the configuration,  _s_e_n_d_m_a_i_l  will  rebuild
  1100.          the  alias  database automatically if possible when
  1101.          it is out of date.  Auto-rebuild can  be  dangerous
  1102.          on  heavily loaded machines with large alias files;
  1103.          if it might take  more  than  the  rebuild  timeout
  1104.          (option  AAlliiaassWWaaiitt,  old  aa, which is normally five
  1105.          minutes) to rebuild the database, there is a chance
  1106.          that  several processes will start the rebuild pro-
  1107.          cess simultaneously.
  1108.  
  1109.               If you have multiple aliases databases  speci-
  1110.          fied,  the --bbii flag rebuilds all the database types
  1111.          it understands (for example, it  can  rebuild  NDBM
  1112.          databases but not NIS databases).
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127. SSMMMM::0088--2222          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1128.  
  1129.  
  1130.       22..55..22..  PPootteennttiiaall pprroobblleemmss
  1131.  
  1132.               There  are a number of problems that can occur
  1133.          with the alias database.  They all  result  from  a
  1134.          _s_e_n_d_m_a_i_l process accessing the DBM version while it
  1135.          is only partially built.  This can happen under two
  1136.          circumstances:  One  process  accesses the database
  1137.          while another process is rebuilding it, or the pro-
  1138.          cess  rebuilding  the  database  dies (due to being
  1139.          killed or a system  crash)  before  completing  the
  1140.          rebuild.
  1141.  
  1142.               Sendmail   has  three  techniques  to  try  to
  1143.          relieve these problems.  First, it  ignores  inter-
  1144.          rupts  while  rebuilding  the database; this avoids
  1145.          the problem of someone aborting the process leaving
  1146.          a partially rebuilt database.  Second, it locks the
  1147.          database source file during the rebuild -- but that
  1148.          may not work over NFS or if the file is unwritable.
  1149.          Third, at the end of the rebuild it adds  an  alias
  1150.          of the form
  1151.  
  1152.              @: @
  1153.  
  1154.          (which  is  not  normally  legal).  Before _s_e_n_d_m_a_i_l
  1155.          will access the database, it checks to insure  that
  1156.          this entry exists9.
  1157.  
  1158.       22..55..33..  LLiisstt oowwnneerrss
  1159.  
  1160.               If  an  error  occurs  on sending to a certain
  1161.          address, say "_x", _s_e_n_d_m_a_i_l will look for  an  alias
  1162.          of  the form "owner-_x" to receive the errors.  This
  1163.          is typically useful for a mailing  list  where  the
  1164.          submitter of the list has no control over the main-
  1165.          tenance of the list itself; in this case  the  list
  1166.          maintainer  would  be  the  owner of the list.  For
  1167.          example:
  1168.  
  1169.              unix-wizards: eric@ucbarpa, wnj@monet, nosuchuser,
  1170.                   sam@matisse
  1171.              owner-unix-wizards: unix-wizards-request
  1172.              unix-wizards-request: eric@ucbarpa
  1173.  
  1174.          would cause "eric@ucbarpa" to get  the  error  that
  1175.          will  occur  when someone sends to unix-wizards due
  1176.          to the inclusion of "nosuchuser" on the list.
  1177. ____________________
  1178.    9The  AAlliiaassWWaaiitt  option  is required in the configuration
  1179. for this action to occur.  This should  normally  be  speci-
  1180. fied.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--2233
  1194.  
  1195.  
  1196.               List owners also  cause  the  envelope  sender
  1197.          address  to be modified.  The contents of the owner
  1198.          alias are used if they point to a single user, oth-
  1199.          erwise  the  name of the alias itself is used.  For
  1200.          this reason, and to obey Internet conventions,  the
  1201.          "owner-"  address normally points at the "-request"
  1202.          address; this causes messages to go  out  with  the
  1203.          typical   Internet   convention  of  using  ``_l_i_s_t-
  1204.          request'' as the return address.
  1205.  
  1206.    22..66..  UUsseerr IInnffoorrmmaattiioonn DDaattaabbaassee
  1207.  
  1208.            If you have a version of _s_e_n_d_m_a_i_l with  the  user
  1209.       information  database compiled in, and you have speci-
  1210.       fied one or more databases using  the  UU  option,  the
  1211.       databases  will be searched for a _u_s_e_r:maildrop entry.
  1212.       If found, the mail  will  be  sent  to  the  specified
  1213.       address.
  1214.  
  1215.    22..77..  PPeerr--UUsseerr FFoorrwwaarrddiinngg ((..ffoorrwwaarrdd FFiilleess))
  1216.  
  1217.            As an alternative to the alias database, any user
  1218.       may put a file with the name ".forward" in his or  her
  1219.       home  directory.   If this file exists, _s_e_n_d_m_a_i_l redi-
  1220.       rects mail for that user  to  the  list  of  addresses
  1221.       listed in the .forward file.  For example, if the home
  1222.       directory for user "mckusick" has a .forward file with
  1223.       contents:
  1224.  
  1225.           mckusick@ernie
  1226.           kirk@calder
  1227.  
  1228.       then  any  mail  arriving for "mckusick" will be redi-
  1229.       rected to the specified accounts.
  1230.  
  1231.            Actually,  the  configuration  file   defines   a
  1232.       sequence  of  filenames to check.  By default, this is
  1233.       the user's .forward file, but can  be  defined  to  be
  1234.       more  generally  using  the  JJ  option.  If you change
  1235.       this, you will have to inform your user  base  of  the
  1236.       change;  .forward is pretty well incorporated into the
  1237.       collective subconscious.
  1238.  
  1239.    22..88..  SSppeecciiaall HHeeaaddeerr LLiinneess
  1240.  
  1241.            Several header lines have special interpretations
  1242.       defined by the configuration file.  Others have inter-
  1243.       pretations built into _s_e_n_d_m_a_i_l that cannot be  changed
  1244.       without   changing   the  code.   These  builtins  are
  1245.       described here.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259. SSMMMM::0088--2244          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1260.  
  1261.  
  1262.       22..88..11..  EErrrroorrss--TToo::
  1263.  
  1264.               If errors occur  anywhere  during  processing,
  1265.          this  header will cause error messages to go to the
  1266.          listed addresses.  This  is  intended  for  mailing
  1267.          lists.
  1268.  
  1269.               The  Errors-To:  header was created in the bad
  1270.          old days when UUCP didn't understand  the  distinc-
  1271.          tion  between  an envelope and a header; this was a
  1272.          hack to provide what should now be  passed  as  the
  1273.          envelope sender address.  It should go away.  It is
  1274.          only used if the UUsseeEErrrroorrssTToo option is set.
  1275.  
  1276.               The Errors-To: header is  official  deprecated
  1277.          and will go away in a future release.
  1278.  
  1279.       22..88..22..  AAppppaarreennttllyy--TToo::
  1280.  
  1281.               RFC  822 requires at least one recipient field
  1282.          (To:, Cc:, or Bcc: line) in every  message.   If  a
  1283.          message  comes  in with no recipients listed in the
  1284.          message then _s_e_n_d_m_a_i_l will adjust the header  based
  1285.          on the "NoRecipientAction" option.  One of the pos-
  1286.          sible actions is to add an "Apparently-To:"  header
  1287.          line  for  any  recipients it is aware of.  This is
  1288.          not put in as a standard recipient line to warn any
  1289.          recipients that the list is not complete.
  1290.  
  1291.               The  Apparently-To: header is non-standard and
  1292.          is deprecated.
  1293.  
  1294.       22..88..33..  PPrreecceeddeennccee
  1295.  
  1296.               The Precedence: header can be used as a  crude
  1297.          control  of  message  priority.  It tweaks the sort
  1298.          order in the queue and can be configured to  change
  1299.          the message timeout values.
  1300.  
  1301.    22..99..  IIDDEENNTT PPrroottooccooll SSuuppppoorrtt
  1302.  
  1303.            _S_e_n_d_m_a_i_l  supports  the IDENT protocol as defined
  1304.       in RFC 1413.  Although this enhances identification of
  1305.       the  author  of  an  email  message  by doing a ``call
  1306.       back'' to the originating system to include the  owner
  1307.       of  a  particular TCP connection in the audit trail it
  1308.       is in no sense perfect; a determined forger can easily
  1309.       spoof  the  IDENT protocol.  The following description
  1310.       is excerpted from RFC 1413:
  1311.  
  1312.            6.  Security Considerations
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--2255
  1326.  
  1327.  
  1328.            The information returned by this protocol  is  at
  1329.            most  as  trustworthy as the host providing it OR
  1330.            the organization operating the host.   For  exam-
  1331.            ple,  a PC in an open lab has few if any controls
  1332.            on it to prevent a user from having this protocol
  1333.            return  any identifier the user wants.  Likewise,
  1334.            if the host has been compromised the  information
  1335.            returned may be completely erroneous and mislead-
  1336.            ing.
  1337.  
  1338.            The Identification Protocol is not intended as an
  1339.            authorization  or  access  control  protocol.  At
  1340.            best, it provides some additional auditing infor-
  1341.            mation  with  respect  to  TCP  connections.   At
  1342.            worst, it can provide misleading,  incorrect,  or
  1343.            maliciously incorrect information.
  1344.  
  1345.            The  use of the information returned by this pro-
  1346.            tocol for other than auditing  is  strongly  dis-
  1347.            couraged.    Specifically,  using  Identification
  1348.            Protocol information to make access control deci-
  1349.            sions  -  either  as the primary method (i.e., no
  1350.            other checks) or as an adjunct to  other  methods
  1351.            may  result  in  a weakening of normal host secu-
  1352.            rity.
  1353.  
  1354.            An Identification server may  reveal  information
  1355.            about users, entities, objects or processes which
  1356.            might normally be considered private.  An Identi-
  1357.            fication server provides service which is a rough
  1358.            analog of the CallerID services provided by  some
  1359.            phone companies and many of the same privacy con-
  1360.            siderations and arguments that apply to the  Cal-
  1361.            lerID  service  apply  to Identification.  If you
  1362.            wouldn't run a "finger"  server  due  to  privacy
  1363.            considerations  you may not want to run this pro-
  1364.            tocol.
  1365.  
  1366.       In some cases your system may not work  properly  with
  1367.       IDENT  support  due to a bug in the TCP/IP implementa-
  1368.       tion.  The symptoms will be that for  some  hosts  the
  1369.       SMTP connection will be closed almost immediately.  If
  1370.       this is true or if you do not want to use  IDENT,  you
  1371.       should  set  the IDENT timeout to zero; this will dis-
  1372.       able the IDENT protocol.
  1373.  
  1374. 33..  AARRGGUUMMEENNTTSS
  1375.  
  1376.         The  complete  list  of  arguments  to  _s_e_n_d_m_a_i_l  is
  1377.    described  in detail in Appendix A.  Some important argu-
  1378.    ments are described here.
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391. SSMMMM::0088--2266          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1392.  
  1393.  
  1394.    33..11..  QQuueeuuee IInntteerrvvaall
  1395.  
  1396.            The amount of time between forking a  process  to
  1397.       run  through  the queue is defined by the --qq flag.  If
  1398.       you run with delivery mode set to ii or bb this  can  be
  1399.       relatively  large, since it will only be relevant when
  1400.       a host that was down comes back up.  If you run  in  qq
  1401.       mode  it  should be relatively short, since it defines
  1402.       the maximum amount of time that a message may  sit  in
  1403.       the queue.  (See also the MinQueueAge option.)
  1404.  
  1405.            RFC  1123  section  5.3.1.1  says that this value
  1406.       should be at least 30 minutes (although that  probably
  1407.       doesn't make sense if you use ``queue-only'' mode).
  1408.  
  1409.    33..22..  DDaaeemmoonn MMooddee
  1410.  
  1411.            If  you  allow  incoming mail over an IPC connec-
  1412.       tion, you should have a daemon running.   This  should
  1413.       be  set  by your _/_e_t_c_/_r_c file using the --bbdd flag.  The
  1414.       --bbdd flag and the --qq flag may be combined in one call:
  1415.  
  1416.           /usr/sbin/sendmail -bd -q30m
  1417.  
  1418.  
  1419.            An alternative approach  is  to  invoke  sendmail
  1420.       from  _i_n_e_t_d(8)  (use  the  --bbss flag to ask sendmail to
  1421.       speak SMTP on its standard input  and  output).   This
  1422.       works and allows you to wrap _s_e_n_d_m_a_i_l in a TCP wrapper
  1423.       program, but may be a bit slower since the  configura-
  1424.       tion  file  has  to  be  re-read on every message that
  1425.       comes in.  If you do this, you still need  to  have  a
  1426.       _s_e_n_d_m_a_i_l running to flush the queue:
  1427.  
  1428.           /usr/sbin/sendmail -q30m
  1429.  
  1430.  
  1431.    33..33..  FFoorrcciinngg tthhee QQuueeuuee
  1432.  
  1433.            In  some  cases  you  may find that the queue has
  1434.       gotten clogged for some reason.  You can force a queue
  1435.       run  using  the --qq flag (with no value).  It is enter-
  1436.       taining to use the --vv flag (verbose) when this is done
  1437.       to watch what happens:
  1438.  
  1439.           /usr/sbin/sendmail -q -v
  1440.  
  1441.  
  1442.            You  can also limit the jobs to those with a par-
  1443.       ticular queue identifier, sender, or  recipient  using
  1444.       one  of  the queue modifiers.  For example, "-qRberke-
  1445.       ley" restricts the queue run to  jobs  that  have  the
  1446.       string  "berkeley"  somewhere  in one of the recipient
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--2277
  1458.  
  1459.  
  1460.       addresses.  Similarly, "-qSstring" limits the  run  to
  1461.       particular  senders  and "-qIstring" limits it to par-
  1462.       ticular queue identifiers.
  1463.  
  1464.    33..44..  DDeebbuuggggiinngg
  1465.  
  1466.            There are a fairly large number  of  debug  flags
  1467.       built into _s_e_n_d_m_a_i_l.  Each debug flag has a number and
  1468.       a level, where higher levels means to print  out  more
  1469.       information.   The  convention  is that levels greater
  1470.       than nine are "absurd," i.e., they print out  so  much
  1471.       information  that  you  wouldn't  normally want to see
  1472.       them except for debugging  that  particular  piece  of
  1473.       code.   Debug  flags  are set using the --dd option; the
  1474.       syntax is:
  1475.  
  1476.           debug-flag:   --dd debug-list
  1477.           debug-list:   debug-option [ , debug-option ]*
  1478.           debug-option: debug-range [ . debug-level ]
  1479.           debug-range:  integer | integer - integer
  1480.           debug-level:  integer
  1481.  
  1482.       where spaces are for reading ease only.  For example,
  1483.  
  1484.           -d12          Set flag 12 to level 1
  1485.           -d12.3        Set flag 12 to level 3
  1486.           -d3-17        Set flags 3 through 17 to level 1
  1487.           -d3-17.4      Set flags 3 through 17 to level 4
  1488.  
  1489.       For a complete list of the available debug  flags  you
  1490.       will have to look at the code (they are too dynamic to
  1491.       keep this documentation up to date).
  1492.  
  1493.    33..55..  CChhaannggiinngg tthhee VVaalluueess ooff OOppttiioonnss
  1494.  
  1495.            Options can be overridden using the --oo or --OO com-
  1496.       mand line flags.  For example,
  1497.  
  1498.           /usr/sbin/sendmail -oT2m
  1499.  
  1500.       sets  the  TT  (timeout) option to two minutes for this
  1501.       run only; the equivalent line using  the  long  option
  1502.       name is
  1503.  
  1504.           /usr/sbin/sendmail -OQueueTimeout=2m
  1505.  
  1506.  
  1507.            Some  options  have security implications.  Send-
  1508.       mail allows you to set  these,  but  relinquishes  its
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523. SSMMMM::0088--2288          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1524.  
  1525.  
  1526.       setuid root permissions thereafter10.
  1527.  
  1528.    33..66..  TTrryyiinngg aa DDiiffffeerreenntt CCoonnffiigguurraattiioonn FFiillee
  1529.  
  1530.            An alternative configuration file can  be  speci-
  1531.       fied using the --CC flag; for example,
  1532.  
  1533.           /usr/sbin/sendmail -Ctest.cf -oQ/tmp/mqueue
  1534.  
  1535.       uses  the  configuration  file  _t_e_s_t_._c_f instead of the
  1536.       default _/_e_t_c_/_s_e_n_d_m_a_i_l_._c_f_.  If the --CC flag has no value
  1537.       it defaults to _s_e_n_d_m_a_i_l_._c_f in the current directory.
  1538.  
  1539.            _S_e_n_d_m_a_i_l  gives  up  its  setuid root permissions
  1540.       when you use this flag, so it is common to use a  pub-
  1541.       licly  writable  directory (such as /tmp) as the spool
  1542.       directory (QueueDirectory or Q option) while  testing.
  1543.  
  1544.    33..77..  LLooggggiinngg TTrraaffffiicc
  1545.  
  1546.            Many  SMTP implementations do not fully implement
  1547.       the protocol.  For  example,  some  personal  computer
  1548.       based  SMTPs  do  not understand continuation lines in
  1549.       reply codes.  These can be very hard to trace.  If you
  1550.       suspect  such  a  problem, you can set traffic logging
  1551.       using the --XX flag.  For example,
  1552.  
  1553.           /usr/sbin/sendmail -X /tmp/traffic -bd
  1554.  
  1555.       will log all traffic in the file _/_t_m_p_/_t_r_a_f_f_i_c.
  1556.  
  1557.            This logs a lot of data very quickly  and  should
  1558.       NNEEVVEERR  be used during normal operations.  After start-
  1559.       ing up such a daemon, force the errant  implementation
  1560.       to  send  a message to your host.  All message traffic
  1561.       in and out of _s_e_n_d_m_a_i_l, including  the  incoming  SMTP
  1562.       traffic, will be logged in this file.
  1563.  
  1564.    33..88..  TTeessttiinngg CCoonnffiigguurraattiioonn FFiilleess
  1565.  
  1566.            When  you build a configuration table, you can do
  1567.       a certain amount of testing using the "test  mode"  of
  1568.       _s_e_n_d_m_a_i_l.  For example, you could invoke _s_e_n_d_m_a_i_l as:
  1569.  
  1570.           sendmail -bt -Ctest.cf
  1571.  
  1572.       which  would read the configuration file "test.cf" and
  1573. ____________________
  1574.    10That  is,  it  sets  its effective uid to the real uid;
  1575. thus, if you are executing as root, as from  root's  crontab
  1576. file  or  during  system  startup  the root permissions will
  1577. still be honored.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--2299
  1590.  
  1591.  
  1592.       enter test mode.  In this mode, you enter lines of the
  1593.       form:
  1594.  
  1595.           rwset address
  1596.  
  1597.       where  _r_w_s_e_t  is the rewriting set you want to use and
  1598.       _a_d_d_r_e_s_s is an address to apply the set to.  Test  mode
  1599.       shows  you  the steps it takes as it proceeds, finally
  1600.       showing you the address it ends up with.  You may  use
  1601.       a comma separated list of rwsets for sequential appli-
  1602.       cation of rules to an input.  For example:
  1603.  
  1604.           3,1,21,4 monet:bollard
  1605.  
  1606.       first   applies   ruleset   three   to    the    input
  1607.       "monet:bollard."   Ruleset  one is then applied to the
  1608.       output of ruleset three, followed similarly  by  rule-
  1609.       sets twenty-one and four.
  1610.  
  1611.            If  you  need  more  detail, you can also use the
  1612.       "-d21" flag to turn on more debugging.  For example,
  1613.  
  1614.           sendmail -bt -d21.99
  1615.  
  1616.       turns on an incredible amount of information; a single
  1617.       word  address  is  probably going to print out several
  1618.       pages worth of information.
  1619.  
  1620.            You should be warned  that  internally,  _s_e_n_d_m_a_i_l
  1621.       applies  ruleset 3 to all addresses.  In test mode you
  1622.       will have to do that  manually.   For  example,  older
  1623.       versions allowed you to use
  1624.  
  1625.           0 bruce@broadcast.sony.com
  1626.  
  1627.       This version requires that you use:
  1628.  
  1629.           3,0 bruce@broadcast.sony.com
  1630.  
  1631.  
  1632.            As of version 8.7, some other syntaxes are avail-
  1633.       able in test mode:
  1634.  
  1635.        +o .Dxvalue defines macro  _x  to  have  the  indicated
  1636.          _v_a_l_u_e.   This  is  useful when debugging rules that
  1637.          use the $$&&_x syntax.
  1638.        +o .Ccvalue adds the indicated _v_a_l_u_e to class _c.
  1639.        +o .Sruleset dumps the contents of the indicated rule-
  1640.          set.
  1641.        +o -ddebug-spec  is  equivalent  to  the  command-line
  1642.          flag.
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655. SSMMMM::0088--3300          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1656.  
  1657.  
  1658. 44..  TTUUNNIINNGG
  1659.  
  1660.         There are a number of configuration  parameters  you
  1661.    may want to change, depending on the requirements of your
  1662.    site.  Most of these are set using an option in the  con-
  1663.    figuration   file.    For  example,  the  line  "O  Time-
  1664.    out.queuereturn=5d" sets option "Timeout.queuereturn"  to
  1665.    the value "5d" (five days).
  1666.  
  1667.         Most  of these options have appropriate defaults for
  1668.    most sites.  However, sites having very high  mail  loads
  1669.    may  find they need to tune them as appropriate for their
  1670.    mail load.  In particular,  sites  experiencing  a  large
  1671.    number  of small messages, many of which are delivered to
  1672.    many recipients, may find that they need  to  adjust  the
  1673.    parameters dealing with queue priorities.
  1674.  
  1675.         All  versions  of  _s_e_n_d_m_a_i_l  prior to 8.7 had single
  1676.    character option names.  As of  8.7,  options  have  long
  1677.    (multi-character  names).   Although  old short names are
  1678.    still accepted, most new options do not have short equiv-
  1679.    alents.
  1680.  
  1681.         This section only describes the options you are most
  1682.    likely to want to tweak; read section 5 for more details.
  1683.  
  1684.    44..11..  TTiimmeeoouuttss
  1685.  
  1686.            All time intervals are set using a scaled syntax.
  1687.       For example, "10m"  represents  ten  minutes,  whereas
  1688.       "2h30m" represents two and a half hours.  The full set
  1689.       of scales is:
  1690.  
  1691.           s   seconds
  1692.           m   minutes
  1693.           h   hours
  1694.           d   days
  1695.           w   weeks
  1696.  
  1697.  
  1698.       44..11..11..  QQuueeuuee iinntteerrvvaall
  1699.  
  1700.               The argument to  the  --qq  flag  specifies  how
  1701.          often  a  sub-daemon  will  run the queue.  This is
  1702.          typically set to between fifteen  minutes  and  one
  1703.          hour.   RFC  1123  section  5.3.1.1 recommends that
  1704.          this be at least 30 minutes.
  1705.  
  1706.       44..11..22..  RReeaadd ttiimmeeoouuttss
  1707.  
  1708.               Timeouts  all   have   option   names   "Time-
  1709.          out._s_u_b_o_p_t_i_o_n".   The  recognized _s_u_b_o_p_t_i_o_ns, their
  1710.          default values, and the minimum values  allowed  by
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--3311
  1722.  
  1723.  
  1724.          RFC 1123 section 5.3.2 are:
  1725.  
  1726.          connect   The  time  to wait for an SMTP connection
  1727.                    to open (the _c_o_n_n_e_c_t(2) system call)  [0,
  1728.                    unspecified].   If  zero, uses the kernel
  1729.                    default.  In  no  case  can  this  option
  1730.                    extend the timeout longer than the kernel
  1731.                    provides, but it can shorten it.  This is
  1732.                    to  get  around  kernels  that provide an
  1733.                    absurdly long connection timeout (90 min-
  1734.                    utes in one case).
  1735.  
  1736.          initial   The  wait  for  the  initial 220 greeting
  1737.                    message [5m, 5m].
  1738.  
  1739.          helo      The wait for a reply from a HELO or  EHLO
  1740.                    command   [5m,  unspecified].   This  may
  1741.                    require a host name lookup, so five  min-
  1742.                    utes is probably a reasonable minimum.
  1743.  
  1744.          mail      The  wait for a reply from a MAIL command
  1745.                    [10m, 5m].
  1746.  
  1747.          rcpt      The wait for a reply from a RCPT  command
  1748.                    [1h, 5m].  This should be long because it
  1749.                    could be pointing at a list that takes  a
  1750.                    long time to expand (see below).
  1751.  
  1752.          datainit  The  wait for a reply from a DATA command
  1753.                    [5m, 2m].
  1754.  
  1755.          datablock The wait for reading a data  block  (that
  1756.                    is,  the body of the message).  [1h, 3m].
  1757.                    This  should  be  long  because  it  also
  1758.                    applies to programs piping input to _s_e_n_d_-
  1759.                    _m_a_i_l which have no guarantee  of  prompt-
  1760.                    ness.
  1761.  
  1762.          datafinal The  wait for a reply from the dot termi-
  1763.                    nating a message.  [1h, 10m].  If this is
  1764.                    shorter than the time actually needed for
  1765.                    the  receiver  to  deliver  the  message,
  1766.                    duplicates  will  be  generated.  This is
  1767.                    discussed in RFC 1047.
  1768.  
  1769.          rset      The wait for a reply from a RSET  command
  1770.                    [5m, unspecified].
  1771.  
  1772.          quit      The  wait for a reply from a QUIT command
  1773.                    [2m, unspecified].
  1774.  
  1775.          misc      The wait for a reply  from  miscellaneous
  1776.                    (but  short)  commands  such as NOOP (no-
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787. SSMMMM::0088--3322          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1788.  
  1789.  
  1790.                    operation)  and  VERB  (go  into  verbose
  1791.                    mode).  [2m, unspecified].
  1792.  
  1793.          command   In  server  SMTP,  the  time  to wait for
  1794.                    another command.  [1h, 5m].
  1795.  
  1796.          ident     The timeout waiting for  a  reply  to  an
  1797.                    IDENT query [30s11, unspecified].
  1798.  
  1799.          For compatibility with old configuration files,  if
  1800.          no  _s_u_b_o_p_t_i_o_n is specified, all the timeouts marked
  1801.          with  are set to the indicated value.
  1802.  
  1803.               Many of the RFC 1123 minimum values  may  well
  1804.          be too short.  _S_e_n_d_m_a_i_l was designed to the RFC 822
  1805.          protocols, which did  not  specify  read  timeouts;
  1806.          hence,  versions  of  _s_e_n_d_m_a_i_l prior to version 8.1
  1807.          did not guarantee to reply  to  messages  promptly.
  1808.          In  particular, a "RCPT" command specifying a mail-
  1809.          ing list will expand and verify the entire list;  a
  1810.          large  list  on  a slow system may easily take more
  1811.          than five minutes12.  I recommend a one hour  time-
  1812.          out  --  since  a communications failure during the
  1813.          RCPT phase is rare, a long timeout is  not  onerous
  1814.          and  may  ultimately  help  reduce network load and
  1815.          duplicated messages.
  1816.  
  1817.               For example, the lines:
  1818.  
  1819.              O Timeout.command=25m
  1820.              O Timeout.datablock=3h
  1821.  
  1822.          sets the server SMTP command timeout to 25  minutes
  1823.          and the input data block timeout to three hours.
  1824.  
  1825.       44..11..33..  MMeessssaaggee ttiimmeeoouuttss
  1826.  
  1827.               After  sitting  in the queue for a few days, a
  1828.          message will time out.  This is to insure  that  at
  1829.          least  the sender is aware of the inability to send
  1830.          a message.  The timeout is typically  set  to  five
  1831.          days.   It  is  sometimes  considered convenient to
  1832.          also send a warning message if the  message  is  in
  1833.          the  queue  longer  than  a few hours (assuming you
  1834.          normally have good connectivity; if  your  messages
  1835. ____________________
  1836.    11On  some systems the default is zero to turn the proto-
  1837. col off entirely.
  1838.    12This verification includes  looking  up  every  address
  1839. with  the name server; this involves network delays, and can
  1840. in some cases can be considerable.
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--3333
  1854.  
  1855.  
  1856.          normally  took  several  hours to send you wouldn't
  1857.          want to do this because it wouldn't be  an  unusual
  1858.          event).   These  timeouts  are  set using the TTiimmee--
  1859.          oouutt..qquueeuueerreettuurrnn and  TTiimmeeoouutt..qquueeuueewwaarrnn  options  in
  1860.          the  configuration  file  (previously both were set
  1861.          using the TT option).
  1862.  
  1863.               Since these options are global, and since  you
  1864.          can not know _a _p_r_i_o_r_i how long another host outside
  1865.          your domain will be down, a  five  day  timeout  is
  1866.          recommended.   This  allows  a recipient to fix the
  1867.          problem even if it occurs at  the  beginning  of  a
  1868.          long  weekend.   RFC 1123 section 5.3.1.1 says that
  1869.          this parameter should be ``at least 4-5 days''.
  1870.  
  1871.               The TTiimmeeoouutt..qquueeuueewwaarrnn value can be piggybacked
  1872.          on  the TT option by indicating a time after which a
  1873.          warning message should be sent;  the  two  timeouts
  1874.          are separated by a slash.  For example, the line
  1875.  
  1876.              OT5d/4h
  1877.  
  1878.          causes email to fail after five days, but a warning
  1879.          message will be sent after four hours.  This should
  1880.          be  large  enough  that  the message will have been
  1881.          tried several times.
  1882.  
  1883.    44..22..  FFoorrkkiinngg DDuurriinngg QQuueeuuee RRuunnss
  1884.  
  1885.            By setting the FFoorrkkEEaacchhJJoobb (YY)  option,  _s_e_n_d_m_a_i_l
  1886.       will fork before each individual message while running
  1887.       the queue.  This will prevent _s_e_n_d_m_a_i_l from  consuming
  1888.       large  amounts  of memory, so it may be useful in mem-
  1889.       ory-poor environments.  However,  if  the  FFoorrkkEEaacchhJJoobb
  1890.       option  is  not set, _s_e_n_d_m_a_i_l will keep track of hosts
  1891.       that are down during a queue run,  which  can  improve
  1892.       performance dramatically.
  1893.  
  1894.            If  the  FFoorrkkEEaacchhJJoobb  option is set, _s_e_n_d_m_a_i_l can
  1895.       not use connection caching.
  1896.  
  1897.    44..33..  QQuueeuuee PPrriioorriittiieess
  1898.  
  1899.            Every message is assigned a priority when  it  is
  1900.       first instantiated, consisting of the message size (in
  1901.       bytes) offset by the message class  (which  is  deter-
  1902.       mined  from  the  Precedence:  header) times the "work
  1903.       class factor" and the number of recipients  times  the
  1904.       "work  recipient  factor."   The  priority  is used to
  1905.       order the queue.  Higher numbers for the priority mean
  1906.       that  the message will be processed later when running
  1907.       the queue.
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919. SSMMMM::0088--3344          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  1920.  
  1921.  
  1922.            The message size is included so that  large  mes-
  1923.       sages  are  penalized relative to small messages.  The
  1924.       message class allows users  to  send  "high  priority"
  1925.       messages  by  including a "Precedence:" field in their
  1926.       message; the value of this field is looked up in the PP
  1927.       lines  of the configuration file.  Since the number of
  1928.       recipients affects the amount of load a  message  pre-
  1929.       sents  to  the  system, this is also included into the
  1930.       priority.
  1931.  
  1932.            The recipient and class factors can be set in the
  1933.       configuration  file  using the RReecciippiieennttFFaaccttoorr (yy) and
  1934.       CCllaassssFFaaccttoorr (zz) options respectively.  They default to
  1935.       30000  (for  the  recipient  factor) and 1800 (for the
  1936.       class factor).  The initial priority is:
  1937.  
  1938.      _p_r_i=_m_s_g_s_i_z_e-(_c_l_a_s_sxCCllaassssFFaaccttoorr))+(_n_r_c_p_txRReecciippiieennttFFaaccttoorr))
  1939.  
  1940.       (Remember, higher values for this  parameter  actually
  1941.       mean  that  the  job will be treated with lower prior-
  1942.       ity.)
  1943.  
  1944.            The priority of a job can also be  adjusted  each
  1945.       time it is processed (that is, each time an attempt is
  1946.       made to deliver it) using the "work time factor,"  set
  1947.       by  the  RReettrryyFFaaccttoorr (ZZ) option.  This is added to the
  1948.       priority, so it normally decreases the  precedence  of
  1949.       the  job,  on  the  grounds that jobs that have failed
  1950.       many times will tend to fail again in the future.  The
  1951.       RReettrryyFFaaccttoorr option defaults to 90000.
  1952.  
  1953.    44..44..  LLooaadd LLiimmiittiinngg
  1954.  
  1955.            _S_e_n_d_m_a_i_l  can be asked to queue (but not deliver)
  1956.       mail if the system load average gets  too  high  using
  1957.       the QQuueeuueeLLAA (xx) option.  When the load average exceeds
  1958.       the value of the QQuueeuueeLLAA option, the delivery mode  is
  1959.       set  to  qq  (queue only) if the QQuueeuueeFFaaccttoorr (qq) option
  1960.       divided by the difference in the current load  average
  1961.       and  the  QQuueeuueeLLAA option plus one exceeds the priority
  1962.       of the message -- that is, the message is queued iff:
  1963.  
  1964.                         _p_r_i>_L__QQ_A__uu-__eeQQ__uuuu__eeee__FFuu__aaee__ccLL__ttAA__oo+__rr1____
  1965.  
  1966.       The QQuueeuueeFFaaccttoorr option defaults  to  600000,  so  each
  1967.       point  of load average is worth 600000 priority points
  1968.       (as described above).
  1969.  
  1970.            For  drastic  cases,  the  RReeffuusseeLLAA  (XX)   option
  1971.       defines  a  load average at which _s_e_n_d_m_a_i_l will refuse
  1972.       to accept network connections.  Locally generated mail
  1973.       (including incoming UUCP mail) is still accepted.
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--3355
  1986.  
  1987.  
  1988.    44..55..  DDeelliivveerryy MMooddee
  1989.  
  1990.            There  are  a number of delivery modes that _s_e_n_d_-
  1991.       _m_a_i_l can operate in, set by the DDeelliivveerryyMMooddee (dd)  con-
  1992.       figuration  option.   These  modes specify how quickly
  1993.       mail will be delivered.  Legal modes are:
  1994.  
  1995.           i   deliver interactively (synchronously)
  1996.           b   deliver in background (asynchronously)
  1997.           q   queue only (don't deliver)
  1998.           d   defer delvery attempts (don't deliver)
  1999.  
  2000.       There are tradeoffs.  Mode "i" gives  the  sender  the
  2001.       quickest  feedback, but may slow down some mailers and
  2002.       is hardly ever necessary.  Mode "b" delivers  promptly
  2003.       but can cause large numbers of processes if you have a
  2004.       mailer that takes a long time to  deliver  a  message.
  2005.       Mode "q" minimizes the load on your machine, but means
  2006.       that delivery may be  delayed  for  up  to  the  queue
  2007.       interval.   Mode  "d"  is identical to mode "q" except
  2008.       that it also prevents all the early map  lookups  from
  2009.       working;  it  is intended for ``dial on demand'' sites
  2010.       where DNS lookups might cost real money.  Some  simple
  2011.       error  messages  (e.g.,  host  unknown during the SMTP
  2012.       protocol) will be delayed using this mode.   Mode  "b"
  2013.       is the usual default.
  2014.  
  2015.            If you run in mode "q" (queue only), "d" (defer),
  2016.       or "b"  (deliver  in  background)  _s_e_n_d_m_a_i_l  will  not
  2017.       expand  aliases and follow .forward files upon initial
  2018.       receipt of the mail.  This speeds up the  response  to
  2019.       RCPT  commands.   Mode  "i" cannot be used by the SMTP
  2020.       server.
  2021.  
  2022.    44..66..  LLoogg LLeevveell
  2023.  
  2024.            The level of logging can  be  set  for  _s_e_n_d_m_a_i_l.
  2025.       The  default  using  a standard configuration table is
  2026.       level 9.  The levels are as follows:
  2027.  
  2028.       0    No logging.
  2029.  
  2030.       1    Serious system failures  and  potential  security
  2031.            problems.
  2032.  
  2033.       2    Lost communications (network problems) and proto-
  2034.            col failures.
  2035.  
  2036.       3    Other serious failures.
  2037.  
  2038.       4    Minor failures.
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051. SSMMMM::0088--3366          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2052.  
  2053.  
  2054.       5    Message collection statistics.
  2055.  
  2056.       6    Creation of error messages, VRFY  and  EXPN  com-
  2057.            mands.
  2058.  
  2059.       7    Delivery failures (host or user unknown, etc.).
  2060.  
  2061.       8    Successful    deliveries   and   alias   database
  2062.            rebuilds.
  2063.  
  2064.       9    Messages being deferred  (due  to  a  host  being
  2065.            down, etc.).
  2066.  
  2067.       10   Database  expansion  (alias,  forward, and userdb
  2068.            lookups).
  2069.  
  2070.       20   Logs attempts to run locked queue  files.   These
  2071.            are not errors, but can be useful to note if your
  2072.            queue appears to be clogged.
  2073.  
  2074.       30   Lost  locks  (only  if  using  lockf  instead  of
  2075.            flock).
  2076.  
  2077.       Additionally,   values   above  64  are  reserved  for
  2078.       extremely verbose debugging output.   No  normal  site
  2079.       would ever set these.
  2080.  
  2081.    44..77..  FFiillee MMooddeess
  2082.  
  2083.            The modes used for files depend on what function-
  2084.       ality you want and the level of security you  require.
  2085.  
  2086.       44..77..11..  TToo ssuuiidd oorr nnoott ttoo ssuuiidd??
  2087.  
  2088.               _S_e_n_d_m_a_i_l  can  safely  be made setuid to root.
  2089.          At the point where it is about to _e_x_e_c(2) a mailer,
  2090.          it  checks  to see if the userid is zero; if so, it
  2091.          resets the userid and groupid to a default (set  by
  2092.          the  uu  and gg options).  (This can be overridden by
  2093.          setting the SS flag to the mailer for  mailers  that
  2094.          are  trusted and must be called as root.)  However,
  2095.          this will cause mail  processing  to  be  accounted
  2096.          (using _s_a(8)) to root rather than to the user send-
  2097.          ing the mail.
  2098.  
  2099.               If you don't make _s_e_n_d_m_a_i_l setuid to root,  it
  2100.          will  still run but you lose a lot of functionality
  2101.          and a lot of privacy, since you'll have to make the
  2102.          queue  directory  world  readable.   You could also
  2103.          make _s_e_n_d_m_a_i_l setuid  to  some  pseudo-user  (e.g.,
  2104.          create  a  user called "sendmail" and make _s_e_n_d_m_a_i_l
  2105.          setuid to that) which will fix the privacy problems
  2106.          but not the functionality issues.  Also, this isn't
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--3377
  2118.  
  2119.  
  2120.          a guarantee of security: for  example,  root  occa-
  2121.          sionally  sends  mail, and the daemon often runs as
  2122.          root.
  2123.  
  2124.       44..77..22..  SShhoouulldd mmyy aalliiaass ddaattaabbaassee bbee wwrriittaabbllee??
  2125.  
  2126.               At  Berkeley  we  have  the   alias   database
  2127.          (/etc/aliases*)  mode  644.   While  this is not as
  2128.          flexible as if  the  database  were  more  666,  it
  2129.          avoids  potential security problems with a globally
  2130.          writable database.
  2131.  
  2132.               The database that _s_e_n_d_m_a_i_l  actually  used  is
  2133.          represented   by  the  two  files  _a_l_i_a_s_e_s_._d_i_r  and
  2134.          _a_l_i_a_s_e_s_._p_a_g (both in /etc) (or  _a_l_i_a_s_e_s_._d_b  if  you
  2135.          are  running  with the new Berkeley database primi-
  2136.          tives).  The mode on these files should  match  the
  2137.          mode  on  /etc/aliases.  If _a_l_i_a_s_e_s is writable and
  2138.          the DBM files  (_a_l_i_a_s_e_s_._d_i_r  and  _a_l_i_a_s_e_s_._p_a_g)  are
  2139.          not,  users will be unable to reflect their desired
  2140.          changes through to the actual  database.   However,
  2141.          if  _a_l_i_a_s_e_s  is  read-only  and  the  DBM files are
  2142.          writable, a slightly sophisticated user can arrange
  2143.          to steal mail anyway.
  2144.  
  2145.               If  your  DBM  files  are  not writable by the
  2146.          world or you do not have auto-rebuild enabled (with
  2147.          the  AAuuttooRReebbuuiillddAAlliiaasseess  option),  then you must be
  2148.          careful to reconstruct the alias database each time
  2149.          you change the text version:
  2150.  
  2151.              newaliases
  2152.  
  2153.          If  this  step is ignored or forgotten any intended
  2154.          changes will also be ignored or forgotten.
  2155.  
  2156.    44..88..  CCoonnnneeccttiioonn CCaacchhiinngg
  2157.  
  2158.            When processing the queue, _s_e_n_d_m_a_i_l will  try  to
  2159.       keep  the  last  few  open  connections  open to avoid
  2160.       startup and shutdown costs.  This only applies to  IPC
  2161.       connections.
  2162.  
  2163.            When  trying  to  open  a connection the cache is
  2164.       first searched.  If an open connection is found, it is
  2165.       probed  to see if it is still active by sending a NOOP
  2166.       command.  It is not an error if this  fails;  instead,
  2167.       the connection is closed and reopened.
  2168.  
  2169.            Two parameters control the connection cache.  The
  2170.       CCoonnnneeccttiioonnCCaacchheeSSiizzee (kk) option defines the  number  of
  2171.       simultaneous  open connections that will be permitted.
  2172.       If it is set to zero, connections will  be  closed  as
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183. SSMMMM::0088--3388          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2184.  
  2185.  
  2186.       quickly as possible.  The default is one.  This should
  2187.       be set as appropriate for your system  size;  it  will
  2188.       limit  the  amount  of  system resources that _s_e_n_d_m_a_i_l
  2189.       will use during queue runs.   Never  set  this  higher
  2190.       than 4.
  2191.  
  2192.            The  CCoonnnneeccttiioonnCCaacchheeTTiimmeeoouutt  (KK) option specifies
  2193.       the maximum time that any cached  connection  will  be
  2194.       permitted  to  idle.   When the idle time exceeds this
  2195.       value the connection is closed.  This number should be
  2196.       small (under ten minutes) to prevent you from grabbing
  2197.       too many resources from other hosts.  The  default  is
  2198.       five minutes.
  2199.  
  2200.    44..99..  NNaammee SSeerrvveerr AAcccceessss
  2201.  
  2202.            Control  of  host  address  lookups is set by the
  2203.       hhoossttss service entry in your service switch  file.   If
  2204.       you  are  on a system that has built-in service switch
  2205.       support (e.g., Ultrix, Solaris,  or  DEC  OSF/1)  then
  2206.       your  system  is probably configured properly already.
  2207.       Otherwise,   _s_e_n_d_m_a_i_l   will    consult    the    file
  2208.       //eettcc//sseerrvviiccee..sswwiittcchh,  which  should be created.  _S_e_n_d_-
  2209.       _m_a_i_l only uses two entries: hhoossttss and aalliiaasseess.
  2210.  
  2211.            However, some systems (such as SunOS) will do DNS
  2212.       lookups  regardless  of  the  setting  of  the service
  2213.       switch entry.  In particular, the system routine _g_e_t_h_-
  2214.       _o_s_t_b_y_n_a_m_e(3)  is  used to look up host names, and many
  2215.       vendor versions try some combination of DNS, NIS,  and
  2216.       file lookup in /etc/hosts without consulting a service
  2217.       switch.  _S_e_n_d_m_a_i_l makes no attempt to work around this
  2218.       problem,  and  the DNS lookup will be done anyway.  If
  2219.       you do not have a nameserver configured at  all,  such
  2220.       as  at  a UUCP-only site, _s_e_n_d_m_a_i_l will get a "connec-
  2221.       tion refused" message when it tries to connect to  the
  2222.       name  server.   If the hhoossttss switch entry has the ser-
  2223.       vice "dns" listed somewhere in the list, _s_e_n_d_m_a_i_l will
  2224.       interpret  this  to  mean a temporary failure and will
  2225.       queue the mail for  later  processing;  otherwise,  it
  2226.       ignores the name server data.
  2227.  
  2228.            The  same  technique is used to decide whether to
  2229.       do MX lookups.  If you want MX support, you _m_u_s_t  have
  2230.       "dns" listed as a service in the hhoossttss switch entry.
  2231.  
  2232.            The  RReessoollvveerrOOppttiioonnss  (II)  option  allows  you to
  2233.       tweak name server options.  The command line  takes  a
  2234.       series of flags as documented in _r_e_s_o_l_v_e_r(3) (with the
  2235.       leading "RES_" deleted).  Each can be preceded  by  an
  2236.       optional `+' or `-'.  For example, the line
  2237.  
  2238.           O ResolverOptions=+AAONLY -DNSRCH
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--3399
  2250.  
  2251.  
  2252.       turns  on  the  AAONLY  (accept  authoritative answers
  2253.       only) and turns off  the  DNSRCH  (search  the  domain
  2254.       path)   options.    Most  resolver  libraries  default
  2255.       DNSRCH, DEFNAMES, and RECURSE flags on and all  others
  2256.       off.   You can also include "HasWildcardMX" to specify
  2257.       that there is  a  wildcard  MX  record  matching  your
  2258.       domain;  this  turns  off MX matching when canonifying
  2259.       names, which can  lead  to  inappropriate  canonifica-
  2260.       tions.
  2261.  
  2262.            Version  level  1  configurations turn DNSRCH and
  2263.       DEFNAMES off when doing delivery  lookups,  but  leave
  2264.       them  on  everywhere  else.   Version  8  of  _s_e_n_d_m_a_i_l
  2265.       ignores them when doing canonification  lookups  (that
  2266.       is, when using $[ ... $]), and always does the search.
  2267.       If you don't want  to  do  automatic  name  extension,
  2268.       don't call $[ ... $].
  2269.  
  2270.            The  search rules for $[ ... $] are somewhat dif-
  2271.       ferent than usual.  If the name being looked up has at
  2272.       least  one  dot,  it  always tries the unmodified name
  2273.       first.  If that fails, it  tries  the  reduced  search
  2274.       path,  and  lastly tries the unmodified name (but only
  2275.       for names without a dot, since names with a  dot  have
  2276.       already  been  tried).   This  allows  names  such  as
  2277.       ``utc.CS'' to match the site in Czechoslovakia  rather
  2278.       than  the  site in your local Computer Science depart-
  2279.       ment.  It also prefers A and  CNAME  records  over  MX
  2280.       records  -- that is, if it finds an MX record it makes
  2281.       note of it, but keeps looking.  This way, if you  have
  2282.       a wildcard MX record matching your domain, it will not
  2283.       assume that all names match.
  2284.  
  2285.            To completely turn off all name server access  on
  2286.       systems without service switch support (such as SunOS)
  2287.       you will have to  recompile  with  -DNAMED_BIND=0  and
  2288.       remove  -lresolv  from  the  list  of  libraries to be
  2289.       searched when linking.
  2290.  
  2291.    44..1100..  MMoovviinngg tthhee PPeerr--UUsseerr FFoorrwwaarrdd FFiilleess
  2292.  
  2293.            Some sites mount each user's home directory  from
  2294.       a  local  disk  on  their  workstation,  so that local
  2295.       access is fast.  However, the result is that  .forward
  2296.       file  lookups  are slow.  In some cases, mail can even
  2297.       be delivered on machines inappropriately because of  a
  2298.       file  server being down.  The performance can be espe-
  2299.       cially bad if you run the automounter.
  2300.  
  2301.            The FFoorrwwaarrddPPaatthh (JJ) option allows you  to  set  a
  2302.       path  of  forward files.  For example, the config file
  2303.       line
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315. SSMMMM::0088--4400          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2316.  
  2317.  
  2318.           O ForwardPath=/var/forward/$u:$z/.forward.$w
  2319.  
  2320.       would first look for a file with the same name as  the
  2321.       user's login in /var/forward; if that is not found (or
  2322.       is inaccessible) the file ``.forward._m_a_c_h_i_n_e_n_a_m_e''  in
  2323.       the  user's  home directory is searched.  A truly per-
  2324.       verse site could also search by sender  by  using  $r,
  2325.       $s, or $f.
  2326.  
  2327.            If  you  create a directory such as /var/forward,
  2328.       it should be mode 1777 (that is, the sticky bit should
  2329.       be set).  Users should create the files mode 644.
  2330.  
  2331.    44..1111..  FFrreeee SSppaaccee
  2332.  
  2333.            On  systems  that have one of the system calls in
  2334.       the _s_t_a_t_f_s(2) family (including  _s_t_a_t_v_f_s  and  _u_s_t_a_t),
  2335.       you can specify a minimum number of free blocks on the
  2336.       queue filesystem using the MMiinnFFrreeeeBBlloocckkss  (bb)  option.
  2337.       If there are fewer than the indicated number of blocks
  2338.       free on the filesystem on which the queue  is  mounted
  2339.       the  SMTP  server  will reject mail with the 452 error
  2340.       code.  This invites  the  SMTP  client  to  try  again
  2341.       later.
  2342.  
  2343.            Beware  of  setting  this option too high; it can
  2344.       cause rejection of email when that mail would be  pro-
  2345.       cessed without difficulty.
  2346.  
  2347.    44..1122..  MMaaxxiimmuumm MMeessssaaggee SSiizzee
  2348.  
  2349.            To  avoid  overflowing  your  system with a large
  2350.       message, the MMaaxxMMeessssaaggeeSSiizzee option can be set  to  set
  2351.       an  absolute  limit  on  the  size of any one message.
  2352.       This will be advertised  in  the  ESMTP  dialogue  and
  2353.       checked during message collection.
  2354.  
  2355.    44..1133..  PPrriivvaaccyy FFllaaggss
  2356.  
  2357.            The  PPrriivvaaccyyOOppttiioonnss  (pp) option allows you to set
  2358.       certain ``privacy'' flags.   Actually,  many  of  them
  2359.       don't  give you any extra privacy, rather just insist-
  2360.       ing that client SMTP  servers  use  the  HELO  command
  2361.       before  using certain commands or adding extra headers
  2362.       to indicate possible spoof attempts.
  2363.  
  2364.            The option takes a  series  of  flag  names;  the
  2365.       final privacy is the inclusive or of those flags.  For
  2366.       example:
  2367.  
  2368.           O PrivacyOptions=needmailhelo, noexpn
  2369.  
  2370.       insists that the HELO or EHLO command be used before a
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--4411
  2382.  
  2383.  
  2384.       MAIL  command  is  accepted and disables the EXPN com-
  2385.       mand.
  2386.  
  2387.            The flags are detailed in section 5.1.6.
  2388.  
  2389.    44..1144..  SSeenndd ttoo MMee TToooo
  2390.  
  2391.            Normally, _s_e_n_d_m_a_i_l deletes the (envelope)  sender
  2392.       from  any  list  expansions.   For  example, if "matt"
  2393.       sends to a list that contains "matt"  as  one  of  the
  2394.       members he won't get a copy of the message.  If the --mm
  2395.       (me too) command line flag, or if the MMeeTToooo (mm) option
  2396.       is  set  in  the configuration file, this behaviour is
  2397.       suppressed.  Some sites like to run  the  SMTP  daemon
  2398.       with --mm.
  2399.  
  2400. 55..  TTHHEE WWHHOOLLEE SSCCOOOOPP OONN TTHHEE CCOONNFFIIGGUURRAATTIIOONN FFIILLEE
  2401.  
  2402.         This  section  describes  the  configuration file in
  2403.    detail.
  2404.  
  2405.         There is one point that should be made clear immedi-
  2406.    ately:  the  syntax of the configuration file is designed
  2407.    to be reasonably easy to parse, since this is done  every
  2408.    time  _s_e_n_d_m_a_i_l starts up, rather than easy for a human to
  2409.    read or write.  On the "future project" list is a config-
  2410.    uration-file compiler.
  2411.  
  2412.         The  configuration  file is organized as a series of
  2413.    lines, each of  which  begins  with  a  single  character
  2414.    defining  the  semantics for the rest of the line.  Lines
  2415.    beginning with a space or a tab  are  continuation  lines
  2416.    (although  the  semantics  are  not  well defined in many
  2417.    places).  Blank lines and lines beginning  with  a  sharp
  2418.    symbol (`#') are comments.
  2419.  
  2420.    55..11..  RR aanndd SS ---- RReewwrriittiinngg RRuulleess
  2421.  
  2422.            The  core  of  address  parsing are the rewriting
  2423.       rules.  These are an ordered production system.  _S_e_n_d_-
  2424.       _m_a_i_l  scans through the set of rewriting rules looking
  2425.       for a match on the left hand side (LHS) of  the  rule.
  2426.       When  a  rule  matches, the address is replaced by the
  2427.       right hand side (RHS) of the rule.
  2428.  
  2429.            There are several sets of rewriting rules.   Some
  2430.       of  the  rewriting  sets  are used internally and must
  2431.       have specific semantics.  Other rewriting sets do  not
  2432.       have  specifically assigned semantics, and may be ref-
  2433.       erenced by the mailer definitions or by other  rewrit-
  2434.       ing sets.
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447. SSMMMM::0088--4422          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2448.  
  2449.  
  2450.            The syntax of these two commands are:
  2451.  
  2452.           SS_n
  2453.  
  2454.       Sets the current ruleset being collected to _n.  If you
  2455.       begin a ruleset more than once it deletes the old def-
  2456.       inition.
  2457.  
  2458.           RR_l_h_s _r_h_s _c_o_m_m_e_n_t_s
  2459.  
  2460.       The fields must be separated by at least one tab char-
  2461.       acter; there may be embedded  spaces  in  the  fields.
  2462.       The _l_h_s is a pattern that is applied to the input.  If
  2463.       it matches, the input is rewritten to  the  _r_h_s.   The
  2464.       _c_o_m_m_e_n_t_s are ignored.
  2465.  
  2466.            Macro  expansions  of  the  form $$_x are performed
  2467.       when the configuration file is  read.   Expansions  of
  2468.       the  form  $$&&_x are performed at run time using a some-
  2469.       what less general algorithm.   This  for  is  intended
  2470.       only for referencing internally defined macros such as
  2471.       $$hh that are changed at runtime.
  2472.  
  2473.       55..11..11..  TThhee lleefftt hhaanndd ssiiddee
  2474.  
  2475.               The left hand side of rewriting rules contains
  2476.          a   pattern.    Normal  words  are  simply  matched
  2477.          directly.  Metasyntax is introduced using a  dollar
  2478.          sign.  The metasymbols are:
  2479.  
  2480.              $$**   Match zero or more tokens
  2481.              $$++   Match one or more tokens
  2482.              $$--   Match exactly one token
  2483.              $$==_x  Match any phrase in class _x
  2484.              $$~~_x  Match any word not in class _x
  2485.  
  2486.          If  any  of  these  match, they are assigned to the
  2487.          symbol $$_n for replacement on the right  hand  side,
  2488.          where  _n  is the index in the LHS.  For example, if
  2489.          the LHS:
  2490.  
  2491.              $-:$+
  2492.  
  2493.          is applied to the input:
  2494.  
  2495.              UCBARPA:eric
  2496.  
  2497.          the rule will match, and the values passed  to  the
  2498.          RHS will be:
  2499.  
  2500.              $1  UCBARPA
  2501.              $2  eric
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--4433
  2514.  
  2515.  
  2516.               Additionally,  the LHS can include $$@@ to match
  2517.          zero tokens.  This is _n_o_t bound to a $$_n on the RHS,
  2518.          and  is  normally only used when it stands alone in
  2519.          order to match the null input.
  2520.  
  2521.       55..11..22..  TThhee rriigghhtt hhaanndd ssiiddee
  2522.  
  2523.               When the left hand side of  a  rewriting  rule
  2524.          matches,  the  input is deleted and replaced by the
  2525.          right hand side.  Tokens are copied  directly  from
  2526.          the  RHS  unless  they  begin  with  a dollar sign.
  2527.          Metasymbols are:
  2528.  
  2529.              $$_n         Substitute indefinite token _n from LHS
  2530.              $$[[_n_a_m_e$$]]   Canonicalize _n_a_m_e
  2531.              $$((_m_a_p _k_e_y $$@@_a_r_g_u_m_e_n_t_s $$::_d_e_f_a_u_l_t $$))
  2532.                         Generalized keyed mapping function
  2533.              $$>>_n        "Call" ruleset _n
  2534.              $$##_m_a_i_l_e_r   Resolve to _m_a_i_l_e_r
  2535.              $$@@_h_o_s_t     Specify _h_o_s_t
  2536.              $$::_u_s_e_r     Specify _u_s_e_r
  2537.  
  2538.  
  2539.               The $$_n syntax  substitutes  the  corresponding
  2540.          value  from  a  $$++,  $$--, $$**, $$==, or $$~~ match on the
  2541.          LHS.  It may be used anywhere.
  2542.  
  2543.               A host name enclosed  between  $$[[  and  $$]]  is
  2544.          looked  up  in the host database(s) and replaced by
  2545.          the canonical name13.  For example, "$[ftp$]" might
  2546.          become          "ftp.CS.Berkeley.EDU"           and
  2547.          "$[[128.32.130.2]$]"     would     become     "van-
  2548.          gogh.CS.Berkeley.EDU."   _S_e_n_d_m_a_i_l  recognizes  it's
  2549.          numeric  IP address without calling the name server
  2550.          and replaces it with it's canonical name.
  2551.  
  2552.               The $$(( ...  $$)) syntax is a more  general  form
  2553.          of  lookup;  it  uses  a  named  map  instead of an
  2554.          implicit map.  If no lookup is found, the indicated
  2555.          _d_e_f_a_u_l_t is inserted; if no default is specified and
  2556.          no lookup matches, the  value  is  left  unchanged.
  2557.          The  _a_r_g_u_m_e_n_t_s  are  passed to the map for possible
  2558.          use.
  2559.  
  2560.               The $$>>_n syntax causes  the  remainder  of  the
  2561.          line  to be substituted as usual and then passed as
  2562.          the argument to ruleset  _n.   The  final  value  of
  2563.          ruleset  _n  then  becomes the substitution for this
  2564. ____________________
  2565.    13This is actually completely equivalent to $(host  _h_o_s_t_-
  2566. _n_a_m_e$).  In particular, a $$:: default can be used.
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579. SSMMMM::0088--4444          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2580.  
  2581.  
  2582.          rule.  The $$>> syntax can only be used at the begin-
  2583.          ning of the right hand side; it can be only be pre-
  2584.          ceded by $$@@ or $$::.
  2585.  
  2586.               The $$## syntax should _o_n_l_y be used  in  ruleset
  2587.          zero  or  a  subroutine of ruleset zero.  It causes
  2588.          evaluation of the ruleset to terminate immediately,
  2589.          and  signals  to _s_e_n_d_m_a_i_l that the address has com-
  2590.          pletely resolved.  The complete syntax is:
  2591.  
  2592.              $$##_m_a_i_l_e_r $$@@_h_o_s_t $$::_u_s_e_r
  2593.  
  2594.          This specifies the  {mailer,  host,  user}  3-tuple
  2595.          necessary  to  direct the mailer.  If the mailer is
  2596.          local  the  host part may be omitted14.  The _m_a_i_l_e_r
  2597.          must be a single word, but the _h_o_s_t and _u_s_e_r may be
  2598.          multi-part.   If  the  _m_a_i_l_e_r  is  the  builtin IPC
  2599.          mailer, the _h_o_s_t may be a colon-separated  list  of
  2600.          hosts  that  are  searched  in  order for the first
  2601.          working address (exactly  like  MX  records).   The
  2602.          _u_s_e_r  is  later  rewritten  by  the mailer-specific
  2603.          envelope rewriting  set  and  assigned  to  the  $$uu
  2604.          macro.   As  a  special case, if the value to $$## is
  2605.          "local" and the first character of the $$:: value  is
  2606.          "@",  the "@" is stripped off, and a flag is set in
  2607.          the address descriptor that causes sendmail to  not
  2608.          do ruleset 5 processing.
  2609.  
  2610.               Normally, a rule that matches is retried, that
  2611.          is, the rule loops until it fails.  A RHS may  also
  2612.          be  preceded  by a $$@@ or a $$:: to change this behav-
  2613.          ior.  A $$@@ prefix causes the ruleset to return with
  2614.          the remainder of the RHS as the value.  A $$:: prefix
  2615.          causes the rule to terminate immediately,  but  the
  2616.          ruleset to continue; this can be used to avoid con-
  2617.          tinued  application  of  a  rule.   The  prefix  is
  2618.          stripped before continuing.
  2619.  
  2620.               The  $$@@ and $$:: prefixes may precede a $$>> spec;
  2621.          for example:
  2622.  
  2623.              R$+     $: $>7 $1
  2624.  
  2625.          matches anything, passes that to ruleset seven, and
  2626.          continues; the $$:: is necessary to avoid an infinite
  2627.          loop.
  2628. ____________________
  2629.    14You may want to use it for special  "per  user"  exten-
  2630. sions.   For  example, in the address "jgm+foo@CMU.EDU"; the
  2631. "+foo" part is not part of the user name, and is  passed  to
  2632. the local mailer for local use.
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--4455
  2646.  
  2647.  
  2648.               Substitution occurs in  the  order  described,
  2649.          that  is,  parameters from the LHS are substituted,
  2650.          hostnames  are  canonicalized,  "subroutines"   are
  2651.          called, and finally $$##, $$@@, and $$:: are processed.
  2652.  
  2653.       55..11..33..  SSeemmaannttiiccss ooff rreewwrriittiinngg rruullee sseettss
  2654.  
  2655.               There  are  five rewriting sets that have spe-
  2656.          cific semantics.  Four  of  these  are  related  as
  2657.          depicted by figure 1.
  2658.  
  2659.               Ruleset  three  should  turn  the address into
  2660.          "canonical form."  This form should have the  basic
  2661.          syntax:
  2662.  
  2663.              local-part@host-domain-spec
  2664.  
  2665.          Ruleset  three  is applied by _s_e_n_d_m_a_i_l before doing
  2666.          anything with any address.
  2667.  
  2668.               If no "@" sign is specified,  then  the  host-
  2669.          domain-spec  _m_a_y  be appended (box "D" in Figure 1)
  2670.          from the sender address (if the CC flag  is  set  in
  2671.          the  mailer definition corresponding to the _s_e_n_d_i_n_g
  2672.          mailer).
  2673.  
  2674.               Ruleset zero is applied after ruleset three to
  2675.          addresses that are going to actually specify recip-
  2676.          ients.  It must resolve to a _{_m_a_i_l_e_r_,  _h_o_s_t_,  _u_s_e_r_}
  2677.          triple.   The  _m_a_i_l_e_r must be defined in the mailer
  2678.  
  2679. ____________________________________________________________
  2680.  
  2681.                     +---+
  2682.                  -->| 0 |-->resolved address
  2683.                 /   +---+
  2684.                /            +---+   +---+
  2685.               /        ---->| 1 |-->| S |--
  2686.        +---+ / +---+  /     +---+   +---+  \    +---+
  2687. addr-->| 3 |-->| D |--                      --->| 4 |-->msg
  2688.        +---+   +---+  \     +---+   +---+  /    +---+
  2689.                         --->| 2 |-->| R |--
  2690.                             +---+   +---+
  2691.  
  2692.             Figure 1 -- Rewriting set semantics
  2693.           D -- sender domain addition
  2694.           S -- mailer-specific sender rewriting
  2695.           R -- mailer-specific recipient rewriting
  2696. ____________________________________________________________
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711. SSMMMM::0088--4466          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2712.  
  2713.  
  2714.          definitions from the configuration file.  The  _h_o_s_t
  2715.          is  defined  into  the $$hh macro for use in the argv
  2716.          expansion of the specified mailer.
  2717.  
  2718.               Rulesets one and two are applied to all sender
  2719.          and  recipient  addresses  respectively.   They are
  2720.          applied before any specification in the mailer def-
  2721.          inition.  They must never resolve.
  2722.  
  2723.               Ruleset  four  is  applied to all addresses in
  2724.          the message.  It is  typically  used  to  translate
  2725.          internal to external form.
  2726.  
  2727.       55..11..44..  IIPPCC mmaaiilleerrss
  2728.  
  2729.               Some  special processing occurs if the ruleset
  2730.          zero resolves to an IPC mailer (that is,  a  mailer
  2731.          that  has  "[IPC]" listed as the Path in the MM con-
  2732.          figuration line.  The host name passed  after  "$@"
  2733.          has  MX expansion performed; this looks the name up
  2734.          in DNS to find alternate delivery sites.
  2735.  
  2736.               The host name can also be provided as a dotted
  2737.          quad in square brackets; for example:
  2738.  
  2739.              [128.32.149.78]
  2740.  
  2741.          This  causes direct conversion of the numeric value
  2742.          to a TCP/IP host address.
  2743.  
  2744.               The host name passed in  after  the  "$@"  may
  2745.          also  be  a colon-separated list of hosts.  Each is
  2746.          separately MX expanded and the results are concate-
  2747.          nated  to make (essentially) one long MX list.  The
  2748.          intent here is to create "fake" MX records that are
  2749.          not published in DNS for private internal networks.
  2750.  
  2751.               As a final special case, the host name can  be
  2752.          passed in as a text string in square brackets:
  2753.  
  2754.              [ucbvax.berkeley.edu]
  2755.  
  2756.          This  form  avoids  the  MX mapping.  NN..BB..:: _T_h_i_s _i_s
  2757.          _i_n_t_e_n_d_e_d _o_n_l_y _f_o_r _s_i_t_u_a_t_i_o_n_s _w_h_e_r_e _y_o_u _h_a_v_e _a  _n_e_t_-
  2758.          _w_o_r_k  _f_i_r_e_w_a_l_l  _o_r  _o_t_h_e_r _h_o_s_t _t_h_a_t _w_i_l_l _d_o _s_p_e_c_i_a_l
  2759.          _p_r_o_c_e_s_s_i_n_g _f_o_r _a_l_l  _y_o_u_r  _m_a_i_l_,  _s_o  _t_h_a_t  _y_o_u_r  _M_X
  2760.          _r_e_c_o_r_d  _p_o_i_n_t_s  _t_o  _a _g_a_t_e_w_a_y _m_a_c_h_i_n_e_; _t_h_i_s _m_a_c_h_i_n_e
  2761.          _c_o_u_l_d _t_h_e_n _d_o _d_i_r_e_c_t _d_e_l_i_v_e_r_y  _t_o  _m_a_c_h_i_n_e_s  _w_i_t_h_i_n
  2762.          _y_o_u_r  _l_o_c_a_l  _d_o_m_a_i_n_.   _U_s_e _o_f _t_h_i_s _f_e_a_t_u_r_e _d_i_r_e_c_t_l_y
  2763.          _v_i_o_l_a_t_e_s _R_F_C _1_1_2_3 _s_e_c_t_i_o_n _5_._3_._5_: _i_t _s_h_o_u_l_d  _n_o_t  _b_e
  2764.          _u_s_e_d _l_i_g_h_t_l_y_.
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--4477
  2778.  
  2779.  
  2780.    55..22..  DD ---- DDeeffiinnee MMaaccrroo
  2781.  
  2782.            Macros  are named with a single character or with
  2783.       a word in {braces}.  Single  character  names  may  be
  2784.       selected  from  the entire ASCII set, but user-defined
  2785.       macros should be selected from the set of  upper  case
  2786.       letters  only.  Lower case letters and special symbols
  2787.       are used internally.   Long  names  beginning  with  a
  2788.       lower  case  letter  or  a  punctuation  character are
  2789.       reserved for use by  sendmail,  so  user-defined  long
  2790.       macro names should begin with an upper case letter.
  2791.  
  2792.            The syntax for macro definitions is:
  2793.  
  2794.           DD_x_v_a_l
  2795.  
  2796.       where  _x is the name of the macro (which may be a sin-
  2797.       gle character or a word in  braces)  and  _v_a_l  is  the
  2798.       value it should have.  There should be no spaces given
  2799.       that do not actually belong in the macro value.
  2800.  
  2801.            Macros are interpolated using the  construct  $$_x,
  2802.       where  _x  is the name of the macro to be interpolated.
  2803.       This interpolation is done when the configuration file
  2804.       is read, except in MM lines.  The special construct $$&&_x
  2805.       can be used in RR lines to get deferred  interpolation.
  2806.  
  2807.            Conditionals can be specified using the syntax:
  2808.  
  2809.           $?x text1 $| text2 $.
  2810.  
  2811.       This  interpolates  _t_e_x_t_1  if the macro $$xx is set, and
  2812.       _t_e_x_t_2 otherwise.  The "else" ($$||) clause may be  omit-
  2813.       ted.
  2814.  
  2815.            Lower  case macro names are reserved to have spe-
  2816.       cial semantics, used to pass information in or out  of
  2817.       _s_e_n_d_m_a_i_l,  and special characters are reserved to pro-
  2818.       vide conditionals, etc.  Upper case names (that is, $$AA
  2819.       through  $$ZZ)  are specifically reserved for configura-
  2820.       tion file authors.
  2821.  
  2822.            The following  macros  are  defined  and/or  used
  2823.       internally  by  _s_e_n_d_m_a_i_l for interpolation into argv's
  2824.       for mailers or for other contexts.   The  ones  marked
  2825.       are  information  passed  into  sendmail15,  the  ones
  2826.       marked  are information passed  both  in  and  out  of
  2827.       sendmail,  and  the  unmarked macros are passed out of
  2828. ____________________
  2829.    15As  of version 8.6, all of these macros have reasonable
  2830. defaults.  Previous versions required that they be  defined.
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843. SSMMMM::0088--4488          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2844.  
  2845.  
  2846.       sendmail but are not otherwise used internally.  These
  2847.       macros are:
  2848.  
  2849.       $a   The  origination date in RFC 822 format.  This is
  2850.            extracted from the Date: line.
  2851.  
  2852.       $b   The current date in RFC 822 format.
  2853.  
  2854.       $c   The hop count.  This is a count of the number  of
  2855.            Received:  lines plus the value of the --hh command
  2856.            line flag.
  2857.  
  2858.       $d   The current date in UNIX (ctime) format.
  2859.  
  2860.       $e   (Obsolete;   use    SmtpGreetingMessage    option
  2861.            instead.)   The  SMTP  entry  message.   This  is
  2862.            printed out when SMTP starts up.  The first  word
  2863.            must  be  the  $$jj  macro  as specified by RFC821.
  2864.            Defaults to "$j Sendmail $v ready at  $b".   Com-
  2865.            monly redefined to include the configuration ver-
  2866.            sion number, e.g., "$j Sendmail  $v/$Z  ready  at
  2867.            $b"
  2868.  
  2869.       $f   The envelope sender (from) address.
  2870.  
  2871.       $g   The  sender  address  relative  to the recipient.
  2872.            For  example,  if  $$ff  is  "foo",  $$gg   will   be
  2873.            "host!foo",  "foo@host.domain",  or  whatever  is
  2874.            appropriate for the receiving mailer.
  2875.  
  2876.       $h   The recipient host.  This is  set  in  ruleset  0
  2877.            from the $# field of a parsed address.
  2878.  
  2879.       $i   The queue id, e.g., "HAA12345".
  2880.  
  2881.       $j   The  "official"  domain name for this site.  This
  2882.            is fully qualified if the full qualification  can
  2883.            be  found.   It _m_u_s_t be redefined to be the fully
  2884.            qualified domain name if your system is not  con-
  2885.            figured so that information can find it automati-
  2886.            cally.
  2887.  
  2888.       $k   The UUCP node name (from the uname system  call).
  2889.  
  2890.       $l   (Obsolete; use UnixFromLine option instead.)  The
  2891.            format of the UNIX from line.   Unless  you  have
  2892.            changed  the  UNIX mailbox format, you should not
  2893.            change the default, which is "From $g  $d".
  2894.  
  2895.       $m   The domain part of the _g_e_t_h_o_s_t_n_a_m_e return  value.
  2896.            Under  normal  circumstances, $$jj is equivalent to
  2897.            $$ww..$$mm.
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--4499
  2910.  
  2911.  
  2912.       $n   The name of  the  daemon  (for  error  messages).
  2913.            Defaults to "MAILER-DAEMON".
  2914.  
  2915.       $o   (Obsolete:  use  OperatorChars  option  instead.)
  2916.            The set of "operators" in addresses.  A  list  of
  2917.            characters  which  will  be considered tokens and
  2918.            which will separate tokens  when  doing  parsing.
  2919.            For  example,  if  "@" were in the $$oo macro, then
  2920.            the input "a@b" would be scanned as three tokens:
  2921.            "a," "@," and "b."  Defaults to ".:@[]", which is
  2922.            the minimum set necessary to do RFC 822  parsing;
  2923.            a  richer  set  of operators is ".:%@!/[]", which
  2924.            adds support for  UUCP,  the  %-hack,  and  X.400
  2925.            addresses.
  2926.  
  2927.       $p   Sendmail's process id.
  2928.  
  2929.       $q   Default  format  of sender address.  The $$qq macro
  2930.            specifies how an address should appear in a  mes-
  2931.            sage  when  it is defaulted.  Defaults to "<$g>".
  2932.            It is commonly redefined to be "$?x$x <$g>$|$g$."
  2933.            or "$g$?x ($x)$.", corresponding to the following
  2934.            two formats:
  2935.  
  2936.                Eric Allman <eric@CS.Berkeley.EDU>
  2937.                eric@CS.Berkeley.EDU (Eric Allman)
  2938.  
  2939.            _S_e_n_d_m_a_i_l properly quotes names that have  special
  2940.            characters if the first form is used.
  2941.  
  2942.       $r   Protocol  used  to receive the message.  Set from
  2943.            the --pp command line flag or by  the  SMTP  server
  2944.            code.
  2945.  
  2946.       $s   Sender's host name.  Set from the --pp command line
  2947.            flag or by the SMTP server code.
  2948.  
  2949.       $t   A numeric representation of the current time.
  2950.  
  2951.       $u   The recipient user.
  2952.  
  2953.       $v   The version number of the _s_e_n_d_m_a_i_l binary.
  2954.  
  2955.       $w   The hostname of this site.  This is the root name
  2956.            of this host (but see below for caveats).
  2957.  
  2958.       $x   The full name of the sender.
  2959.  
  2960.       $z   The home directory of the recipient.
  2961.  
  2962.       $_   The validated sender address.
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975. SSMMMM::0088--5500          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  2976.  
  2977.  
  2978.            There  are three types of dates that can be used.
  2979.       The $$aa and $$bb macros are in RFC 822 format; $$aa is  the
  2980.       time as extracted from the "Date:" line of the message
  2981.       (if there was one), and $$bb is  the  current  date  and
  2982.       time  (used  for  postmarks).   If  no "Date:" line is
  2983.       found in the incoming message, $$aa is set to  the  cur-
  2984.       rent  time also.  The $$dd macro is equivalent to the $$bb
  2985.       macro in UNIX (ctime) format.
  2986.  
  2987.            The macros $$ww, $$jj, and $$mm are set to the identity
  2988.       of this host.  _S_e_n_d_m_a_i_l tries to find the fully quali-
  2989.       fied name of the host if at all possible; it does this
  2990.       by  calling _g_e_t_h_o_s_t_n_a_m_e(2) to get the current hostname
  2991.       and then passing that  to  _g_e_t_h_o_s_t_b_y_n_a_m_e(3)  which  is
  2992.       supposed  to return the canonical version of that host
  2993.       name.16 Assuming this is successful, $$jj is set to  the
  2994.       fully  qualified name and $$mm is set to the domain part
  2995.       of the name (everything after the first dot).  The  $$ww
  2996.       macro  is set to the first word (everything before the
  2997.       first dot) if you have a level 5 or higher  configura-
  2998.       tion  file;  otherwise, it is set to the same value as
  2999.       $$jj.  If the canonification is not  successful,  it  is
  3000.       imperative  that  the  config file set $$jj to the fully
  3001.       qualified domain name17.
  3002.  
  3003.            The  $$ff  macro  is the id of the sender as origi-
  3004.       nally determined; when mailing to a specific host  the
  3005.       $$gg  macro is set to the address of the sender _r_e_l_a_t_i_v_e
  3006.       _t_o _t_h_e _r_e_c_i_p_i_e_n_t_.  For example, if  I  send  to  "bol-
  3007.       lard@matisse.CS.Berkeley.EDU"  from  the machine "van-
  3008.       gogh.CS.Berkeley.EDU" the $$ff macro will be "eric"  and
  3009.       the $$gg macro will be "eric@vangogh.CS.Berkeley.EDU."
  3010.  
  3011.            The  $$xx  macro  is  set  to  the full name of the
  3012.       sender.  This can be determined in several  ways.   It
  3013.       can  be passed as flag to _s_e_n_d_m_a_i_l.  It can be defined
  3014.       in the NAME environment variable.  The third choice is
  3015.       the value of the "Full-Name:" line in the header if it
  3016.       exists, and the fourth choice is the comment field  of
  3017.       a "From:" line.  If all of these fail, and if the mes-
  3018.       sage is being originated locally,  the  full  name  is
  3019.       looked up in the _/_e_t_c_/_p_a_s_s_w_d file.
  3020.  
  3021.            When  sending,  the $$hh, $$uu, and $$zz macros get set
  3022.       to the host, user, and home directory  (if  local)  of
  3023. ____________________
  3024.    16For example, on some systems _g_e_t_h_o_s_t_n_a_m_e  might  return
  3025. "foo"  which  would be mapped to "foo.bar.com" by _g_e_t_h_o_s_t_b_y_-
  3026. _n_a_m_e.
  3027.    17Older versions of sendmail didn't pre-define $$jj at all,
  3028. so up until 8.6, config files _a_l_w_a_y_s had to define $$jj.
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--5511
  3042.  
  3043.  
  3044.       the  recipient.  The first two are set from the $$@@ and
  3045.       $$:: part of the rewriting rules, respectively.
  3046.  
  3047.            The $$pp and $$tt macros are used  to  create  unique
  3048.       strings  (e.g.,  for the "Message-Id:" field).  The $$ii
  3049.       macro is set to the queue id on this host; if put into
  3050.       the  timestamp  line  it  can  be extremely useful for
  3051.       tracking messages.  The $$vv macro is set to be the ver-
  3052.       sion  number  of  _s_e_n_d_m_a_i_l;  this  is  normally put in
  3053.       timestamps and has been proven  extremely  useful  for
  3054.       debugging.
  3055.  
  3056.            The $$cc field is set to the "hop count," i.e., the
  3057.       number of times this message has been processed.  This
  3058.       can  be  determined by the --hh flag on the command line
  3059.       or by counting the timestamps in the message.
  3060.  
  3061.            The $$rr and $$ss fields are set to the protocol used
  3062.       to communicate with _s_e_n_d_m_a_i_l and the sending hostname.
  3063.       They can be set together using  the  --pp  command  line
  3064.       flag or separately using the --MM or --ooMM flags.
  3065.  
  3066.            The  $$__  is  set to a validated sender host name.
  3067.       If the sender is running an RFC 1413  compliant  IDENT
  3068.       server  and the receiver has the IDENT protocol turned
  3069.       on, it will include the user name on that host.
  3070.  
  3071.    55..33..  CC aanndd FF ---- DDeeffiinnee CCllaasssseess
  3072.  
  3073.            Classes of phrases may be defined to match on the
  3074.       left hand side of rewriting rules, where a "phrase" is
  3075.       a sequence of characters that  do  not  contain  space
  3076.       characters.   For  example  a class of all local names
  3077.       for this site might be created  so  that  attempts  to
  3078.       send  to  oneself can be eliminated.  These can either
  3079.       be defined directly in the configuration file or  read
  3080.       in  from  another file.  Classes are named as a single
  3081.       letter or a word in {braces}.  Class  names  beginning
  3082.       with  lower  case  letters  and special characters are
  3083.       reserved for system use.  Classes  defined  in  config
  3084.       files  may  be  given names from the set of upper case
  3085.       letters for short names or  beginning  with  an  upper
  3086.       case letter for long names.
  3087.  
  3088.            The syntax is:
  3089.  
  3090.           CC_c_p_h_r_a_s_e_1 _p_h_r_a_s_e_2_._._.
  3091.           FF_c_f_i_l_e
  3092.  
  3093.       The first form defines the class _c to match any of the
  3094.       named words.  It is permissible to  split  them  among
  3095.       multiple lines; for example, the two forms:
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107. SSMMMM::0088--5522          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3108.  
  3109.  
  3110.           CHmonet ucbmonet
  3111.  
  3112.       and
  3113.  
  3114.           CHmonet
  3115.           CHucbmonet
  3116.  
  3117.       are  equivalent.  The ``F'' form reads the elements of
  3118.       the class _c from the named _f_i_l_e.
  3119.  
  3120.            Elements of classes  can  be  accessed  in  rules
  3121.       using  $$==  or $$~~.  The $$~~ (match entries not in class)
  3122.       only matches a single word; multi-word entries in  the
  3123.       class are ignored in this context.
  3124.  
  3125.            The  class  $$==ww is set to be the set of all names
  3126.       this host is known by.  This  can  be  used  to  match
  3127.       local hostnames.
  3128.  
  3129.            The  class  $$==kk is set to be the same as $$kk, that
  3130.       is, the UUCP node name.
  3131.  
  3132.            The class $$==mm is set to the  set  of  domains  by
  3133.       which this host is known, initially just $$mm.
  3134.  
  3135.            The  class $$==tt is set to the set of trusted users
  3136.       by the TT configuration line.   If  you  want  to  read
  3137.       trusted users from a file use FFtt_/_f_i_l_e_/_n_a_m_e.
  3138.  
  3139.            The  class $$==nn can be set to the set of MIME body
  3140.       types that can never be eight to  seven  bit  encoded.
  3141.       It  defaults  to  "multipart/signed".   Message  types
  3142.       "message/*"  and  "multipart/*"  are   never   encoded
  3143.       directly.    Multipart  messages  are  always  handled
  3144.       recursively.  The handling of message/*  messages  are
  3145.       controlled  by  class $$==ss.  The class $$==ee contains the
  3146.       Content-Transfer-Encodings  that  can  be   8->7   bit
  3147.       encoded.   It is predefined to contain "7bit", "8bit",
  3148.       and "binary".  The class $$==ss contains the set of  sub-
  3149.       types  of message that can be treated recursively.  By
  3150.       default it contains only "rfc822".  Other  "message/*"
  3151.       types  cannot  be 8->7 bit encoded.  If a message con-
  3152.       taining eight bit data is sent to a  seven  bit  host,
  3153.       and that message cannot be encoded into seven bits, it
  3154.       will be stripped to 7 bits.
  3155.  
  3156.            _S_e_n_d_m_a_i_l can be  compiled  to  allow  a  _s_c_a_n_f(3)
  3157.       string  on  the  FF  line.  This lets you do simplistic
  3158.       parsing of text files.  For example, to read  all  the
  3159.       user  names  in  your  system  _/_e_t_c_/_p_a_s_s_w_d file into a
  3160.       class, use
  3161.  
  3162.           FL/etc/passwd %[^:]
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--5533
  3174.  
  3175.  
  3176.       which reads every line up to the first colon.
  3177.  
  3178.    55..44..  MM ---- DDeeffiinnee MMaaiilleerr
  3179.  
  3180.            Programs and interfaces to mailers are defined in
  3181.       this line.  The format is:
  3182.  
  3183.           MM_n_a_m_e, {_f_i_e_l_d=_v_a_l_u_e}*
  3184.  
  3185.       where  _n_a_m_e is the name of the mailer (used internally
  3186.       only) and the "field=name" pairs define attributes  of
  3187.       the mailer.  Fields are:
  3188.  
  3189.           Path      The pathname of the mailer
  3190.           Flags     Special flags for this mailer
  3191.           Sender    Rewriting set(s) for sender addresses
  3192.           Recipient Rewriting set(s) for recipient addresses
  3193.           Argv      An argument vector to pass to this mailer
  3194.           Eol       The end-of-line string for this mailer
  3195.           Maxsize   The maximum message length to this mailer
  3196.           Linelimit The maximum line length in the message body
  3197.           Directory The working directory for the mailer
  3198.           Userid    The default user and group id to run as
  3199.           Nice      The nice(2) increment for the mailer
  3200.           Charset   The default character set for 8-bit characters
  3201.           Type      The MTS type information (used for error messages)
  3202.  
  3203.       Only the first character of the field name is checked.
  3204.  
  3205.            The following flags may  be  set  in  the  mailer
  3206.       description.   Any  other  flags may be used freely to
  3207.       conditionally assign headers to messages destined  for
  3208.       particular  mailers.  Flags marked with are not inter-
  3209.       preted by the _s_e_n_d_m_a_i_l binary; these are  the  conven-
  3210.       tionally used to correlate to the flags portion of the
  3211.       HH line.  Flags marked with apply to  the  mailers  for
  3212.       the  sender  address  rather  than the usual recipient
  3213.       mailers.
  3214.  
  3215.       a   Run Extended SMTP  (ESMTP)  protocol  (defined  in
  3216.           RFCs 1651, 1652, and 1653).  This flag defaults on
  3217.           if the SMTP greeting  message  includes  the  word
  3218.           "ESMTP".
  3219.  
  3220.       A   Look  up the user part of the address in the alias
  3221.           database.  Normally this is  only  set  for  local
  3222.           mailers.
  3223.  
  3224.       b   Force  a blank line on the end of a message.  This
  3225.           is intended to work around some stupid versions of
  3226.           /bin/mail  that  require  a blank line, but do not
  3227.           provide it themselves.  It would not  normally  be
  3228.           used on network mail.
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239. SSMMMM::0088--5544          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3240.  
  3241.  
  3242.       c   Do not include comments in addresses.  This should
  3243.           only be used if you have to work around  a  remote
  3244.           mailer  that  gets  confused  by  comments.   This
  3245.           strips addresses of the form "Phrase <address>" or
  3246.           "address (Comment)" down to just "address".
  3247.  
  3248.       C   If  mail  is _r_e_c_e_i_v_e_d from a mailer with this flag
  3249.           set, any addresses in the header that do not  have
  3250.           an  at sign ("@") after being rewritten by ruleset
  3251.           three will have  the  "@domain"  clause  from  the
  3252.           sender  envelope  address  tacked on.  This allows
  3253.           mail with headers of the form:
  3254.  
  3255.               From: usera@hosta
  3256.               To: userb@hostb, userc
  3257.  
  3258.           to be rewritten as:
  3259.  
  3260.               From: usera@hosta
  3261.               To: userb@hostb, userc@hosta
  3262.  
  3263.           automatically.  However, it  doesn't  really  work
  3264.           reliably.
  3265.  
  3266.       D   This mailer wants a "Date:" header line.
  3267.  
  3268.       e   This  mailer is expensive to connect to, so try to
  3269.           avoid connecting normally; any  necessary  connec-
  3270.           tion will occur during a queue run.
  3271.  
  3272.       E   Escape  lines beginning with "From" in the message
  3273.           with a `>' sign.
  3274.  
  3275.       f   The mailer wants a --ff _f_r_o_m flag, but only if  this
  3276.           is  a  network forward operation (i.e., the mailer
  3277.           will give an error if the executing user does  not
  3278.           have special permissions).
  3279.  
  3280.       F   This mailer wants a "From:" header line.
  3281.  
  3282.       g   Normally,   _s_e_n_d_m_a_i_l  sends  internally  generated
  3283.           email (e.g., error messages) using the null return
  3284.           address  as  required  by RFC 1123.  However, some
  3285.           mailers don't accept a null  return  address.   If
  3286.           necessary, you can set the gg flag to prevent _s_e_n_d_-
  3287.           _m_a_i_l from obeying the  standards;  error  messages
  3288.           will  be sent as from the MAILER-DAEMON (actually,
  3289.           the value of the $$nn macro).
  3290.  
  3291.       h   Upper case should be preserved in host  names  for
  3292.           this mailer.
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--5555
  3306.  
  3307.  
  3308.       I   This mailer will be speaking SMTP to another _s_e_n_d_-
  3309.           _m_a_i_l -- as such it can use special  protocol  fea-
  3310.           tures.  This option is not required (i.e., if this
  3311.           option is  omitted  the  transmission  will  still
  3312.           operate  successfully,  although  perhaps  not  as
  3313.           efficiently as possible).
  3314.  
  3315.       k   Normally when _s_e_n_d_m_a_i_l  connects  to  a  host  via
  3316.           SMTP, it checks to make sure that this isn't acci-
  3317.           dently the same host name as might happen if _s_e_n_d_-
  3318.           _m_a_i_l  is  misconfigured  or if a long-haul network
  3319.           interface is set in loopback mode.  This flag dis-
  3320.           ables  the loopback check.  It should only be used
  3321.           under very unusual circumstances.
  3322.  
  3323.       K   Currently unimplemented.  Reserved for chunking.
  3324.  
  3325.       l   This mailer is local (i.e., final delivery will be
  3326.           performed).
  3327.  
  3328.       L   Limit  the  line  lengths  as specified in RFC821.
  3329.           This deprecated option should be replaced  by  the
  3330.           LL==  mail declaration.  For historic reasons, the LL
  3331.           flag also sets the 77 flag.
  3332.  
  3333.       m   This mailer can send to multiple users on the same
  3334.           host  in  one transaction.  When a $$uu macro occurs
  3335.           in the _a_r_g_v part of the  mailer  definition,  that
  3336.           field will be repeated as necessary for all quali-
  3337.           fying users.
  3338.  
  3339.       M   This mailer wants a "Message-Id:" header line.
  3340.  
  3341.       n   Do not insert a  UNIX-style  "From"  line  on  the
  3342.           front of the message.
  3343.  
  3344.       o   Always  run as the owner of the recipient mailbox.
  3345.           Normally _s_e_n_d_m_a_i_l runs as the sender  for  locally
  3346.           generated  mail or as "daemon" (actually, the user
  3347.           specified in the uu option) when delivering network
  3348.           mail.   The  normal  behaviour is required by most
  3349.           local mailers, which will not allow  the  envelope
  3350.           sender address to be set unless the mailer is run-
  3351.           ning as daemon.  This flag is  ignored  if  the  SS
  3352.           flag is set.
  3353.  
  3354.       p   Use  the route-addr style reverse-path in the SMTP
  3355.           "MAIL FROM:" command rather than just  the  return
  3356.           address;  although this is required in RFC821 sec-
  3357.           tion 3.1, many hosts do not process  reverse-paths
  3358.           properly.   Reverse-paths  are officially discour-
  3359.           aged by RFC 1123.
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371. SSMMMM::0088--5566          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3372.  
  3373.  
  3374.       P   This mailer wants a "Return-Path:" line.
  3375.  
  3376.       r   Same as ff, but sends a --rr flag.
  3377.  
  3378.       s   Strip quote  characters  ("  and  \)  off  of  the
  3379.           address before calling the mailer.
  3380.  
  3381.       S   Don't  reset the userid before calling the mailer.
  3382.           This would be used in a secure  environment  where
  3383.           _s_e_n_d_m_a_i_l ran as root.  This could be used to avoid
  3384.           forged addresses.  If the UU== field is also  speci-
  3385.           fied,  this  flag  causes the user id to always be
  3386.           set to that user and group (instead of leaving  it
  3387.           as root).
  3388.  
  3389.       u   Upper  case  should be preserved in user names for
  3390.           this mailer.
  3391.  
  3392.       U   This mailer wants UUCP-style "From" lines with the
  3393.           ugly "remote from <host>" on the end.
  3394.  
  3395.       w   The  user  must  have  a  valid  account  on  this
  3396.           machine, i.e., getpwnam must succeed.  If not, the
  3397.           mail  is  bounced.  This is required to get ".for-
  3398.           ward" capability.
  3399.  
  3400.       x   This mailer wants a "Full-Name:" header line.
  3401.  
  3402.       X   This mailer want to use the hidden  dot  algorithm
  3403.           as specified in RFC821; basically, any line begin-
  3404.           ning with a dot will have an extra  dot  prepended
  3405.           (to  be  stripped at the other end).  This insures
  3406.           that lines in the message containing  a  dot  will
  3407.           not terminate the message prematurely.
  3408.  
  3409.       5   If no aliases are found for this address, pass the
  3410.           address through ruleset 5 for  possible  alternate
  3411.           resolution.   This is intended to forward the mail
  3412.           to an alternate delivery spot.
  3413.  
  3414.       7   Strip all output  to  seven  bits.   This  is  the
  3415.           default  if the LL flag is set.  Note that clearing
  3416.           this option is not sufficient to  get  full  eight
  3417.           bit data passed through _s_e_n_d_m_a_i_l.  If the 77 option
  3418.           is set, this is essentially always set, since  the
  3419.           eighth  bit was stripped on input.  Note that this
  3420.           option will only impact messages that didn't  have
  3421.           8->7 bit MIME conversions performed.
  3422.  
  3423.       8   If set, it is acceptable to send eight bit data to
  3424.           this mailer; the usual attempt to do 8->7 bit MIME
  3425.           conversions will be bypassed.
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--5577
  3438.  
  3439.  
  3440.       :   Check  addresses to see if they begin ":include:";
  3441.           if  they  do,  convert  them  to  the  "*include*"
  3442.           mailer.
  3443.  
  3444.       |   Check  addresses  to see if they begin with a `|';
  3445.           if they do, convert them to the "prog" mailer.
  3446.  
  3447.       /   Check addresses to see if they begin with  a  `/';
  3448.           if they do, convert them to the "*file*" mailer.
  3449.  
  3450.       @   Look up addresses in the user database.
  3451.  
  3452.            Configuration  files  prior to level 6 assume the
  3453.       `A', `w', `5', `:', `|', `/', and `@' options  on  the
  3454.       mailer named "local".
  3455.  
  3456.            The  mailer  with the special name "error" can be
  3457.       used to generate a user error.   The  (optional)  host
  3458.       field  is  an exit status to be returned, and the user
  3459.       field is a message to be printed.  The exit status may
  3460.       be numeric or one of the values USAGE, NOUSER, NOHOST,
  3461.       UNAVAILABLE, SOFTWARE, TEMPFAIL, PROTOCOL,  or  CONFIG
  3462.       to  return the corresponding EX_ exit code.  For exam-
  3463.       ple, the entry:
  3464.  
  3465.           $#error $@ NOHOST $: Host unknown in this domain
  3466.  
  3467.       on the RHS of a rule will cause the specified error to
  3468.       be  generated and the "Host unknown" exit status to be
  3469.       returned if the LHS  matches.   This  mailer  is  only
  3470.       functional in rulesets zero or five.
  3471.  
  3472.            The mailer named "local" _m_u_s_t be defined in every
  3473.       configuration file.  This is  used  to  deliver  local
  3474.       mail, and is treated specially in several ways.  Addi-
  3475.       tionally, three other mailers named "prog",  "*file*",
  3476.       and "*include*" may be defined to tune the delivery of
  3477.       messages  to  programs,  files,  and  :include:  lists
  3478.       respectively.  They default to:
  3479.  
  3480.           Mprog, P=/bin/sh, F=lsD, A=sh -c $u
  3481.           M*file*, P=/dev/null, F=lsDFMPEu, A=FILE
  3482.           M*include*, P=/dev/null, F=su, A=INCLUDE
  3483.  
  3484.  
  3485.            The  Sender  and  Recipient  rewriting  sets  may
  3486.       either be a simple ruleset id or may be two ids  sepa-
  3487.       rated  by  a  slash; if so, the first rewriting set is
  3488.       applied  to  envelope  addresses  and  the  second  is
  3489.       applied to headers.
  3490.  
  3491.            The  Directory is actually a colon-separated path
  3492.       of directories to try.  For  example,  the  definition
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503. SSMMMM::0088--5588          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3504.  
  3505.  
  3506.       "D=$z:/"  first  tries  to  execute in the recipient's
  3507.       home directory; if that is not available, it tries  to
  3508.       execute  in  the  root  of  the  filesystem.   This is
  3509.       intended to be used only on the "prog"  mailer,  since
  3510.       some  shells  (such  as _c_s_h) refuse to execute if they
  3511.       cannot read  the  home  directory.   Since  the  queue
  3512.       directory  is  not  normally  readable by unprivileged
  3513.       users _c_s_h scripts as recipients can fail.
  3514.  
  3515.            The Userid specifies the default user  and  group
  3516.       id  to  run  as,  overriding  the  DDeeffaauullttUUsseerr  option
  3517.       (q.v.).  If the SS mailer flag is also specified,  this
  3518.       is  the user and group to run as in all circumstances.
  3519.       This may be given as _u_s_e_r_:_g_r_o_u_p to set both  the  user
  3520.       and  group  id; either may be an integer or a symbolic
  3521.       name to be looked up in the  _p_a_s_s_w_d  and  _g_r_o_u_p  files
  3522.       respectively.   If only a symbolic user name is speci-
  3523.       fied, the group id in the _p_a_s_s_w_d file for that user is
  3524.       used as the group id.
  3525.  
  3526.            The  Charset field is used when converting a mes-
  3527.       sage to MIME; this is the character set  used  in  the
  3528.       Content-Type:   header.   If  this  is  not  set,  the
  3529.       DDeeffaauullttCChhaarrsseett option is used, and if that is not set,
  3530.       the value "unknown-8bit" is used.  WWAARRNNIINNGG:: this field
  3531.       applies to the sender's mailer,  not  the  recipient's
  3532.       mailer.   For  example, if the envelope sender address
  3533.       lists an address on the local network and the  recipi-
  3534.       ent  is on an external network, the character set will
  3535.       be set from the Charset= field for the  local  network
  3536.       mailer, not that of the external network mailer.
  3537.  
  3538.            The Type= field sets the type information used in
  3539.       MIME error messages as defined by  RFC  XXX  (not  yet
  3540.       published).   It is actually three values separated by
  3541.       slashes: the MTA-type (that is, the description of how
  3542.       hosts are named), the address type (the description of
  3543.       e-mail  addresses),  and  the  diagnostic  type   (the
  3544.       description of error diagnostic codes).  Each of these
  3545.       must be a registered value or begin  with  "X-".   The
  3546.       default is "dns/rfc822/smtp".
  3547.  
  3548.    55..55..  HH ---- DDeeffiinnee HHeeaaddeerr
  3549.  
  3550.            The  format  of  the  header  lines that _s_e_n_d_m_a_i_l
  3551.       inserts into the message are defined by  the  HH  line.
  3552.       The syntax of this line is:
  3553.  
  3554.           HH[??_m_f_l_a_g_s??]_h_n_a_m_e:: _h_t_e_m_p_l_a_t_e
  3555.  
  3556.       Continuation lines in this spec are reflected directly
  3557.       into the outgoing message.   The  _h_t_e_m_p_l_a_t_e  is  macro
  3558.       expanded  before  insertion  into the message.  If the
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--5599
  3570.  
  3571.  
  3572.       _m_f_l_a_g_s (surrounded by question marks)  are  specified,
  3573.       at  least one of the specified flags must be stated in
  3574.       the mailer definition for this header to be  automati-
  3575.       cally output.  If one of these headers is in the input
  3576.       it is reflected to  the  output  regardless  of  these
  3577.       flags.
  3578.  
  3579.            Some  headers have special semantics that will be
  3580.       described later.
  3581.  
  3582.    55..66..  OO ---- SSeett OOppttiioonn
  3583.  
  3584.            There are a number of global options that can  be
  3585.       set  from  a  configuration  file.  Options are repre-
  3586.       sented by full words; some are also  representable  as
  3587.       single  characters for back compatibility.  The syntax
  3588.       of this line is:
  3589.  
  3590.           OO  _o_p_t_i_o_n==_v_a_l_u_e
  3591.  
  3592.       This sets option _o_p_t_i_o_n to be _v_a_l_u_e.  Note that  there
  3593.       _m_u_s_t be a space between the letter `O' and the name of
  3594.       the option.  An older version is:
  3595.  
  3596.           OO_o_v_a_l_u_e
  3597.  
  3598.       where the option _o is a single  character.   Depending
  3599.       on  the  option,  _v_a_l_u_e may be a string, an integer, a
  3600.       boolean (with legal values "t", "T", "f", or "F";  the
  3601.       default is TRUE), or a time interval.
  3602.  
  3603.            The  options supported (with the old, one charac-
  3604.       ter names in brackets) are:
  3605.  
  3606.       AliasFile=_s_p_e_c_, _s_p_e_c_, _._._.
  3607.                 [A] Specify possible  alias  file(s).   Each
  3608.                 _s_p_e_c should be in the format ``_c_l_a_s_s:: _f_i_l_e''
  3609.                 where _c_l_a_s_s:: is  optional  and  defaults  to
  3610.                 ``implicit''.   Depending on how _s_e_n_d_m_a_i_l is
  3611.                 compiled,  valid  classes   are   "implicit"
  3612.                 (search  through a compiled-in list of alias
  3613.                 file types, for back compatibility),  "hash"
  3614.                 (if  NEWDB  is specified), "dbm" (if NDBM is
  3615.                 specified), "stab" (internal symbol table --
  3616.                 not  normally  used unless you have no other
  3617.                 database lookup), or "nis" (if NIS is speci-
  3618.                 fied).   If  a  list  of _s_p_e_cs are provided,
  3619.                 _s_e_n_d_m_a_i_l searches them in order.
  3620.  
  3621.       AliasWait=_t_i_m_e_o_u_t
  3622.                 [a]  If  set,  wait  up  to  _t_i_m_e_o_u_t  (units
  3623.                 default  to  minutes)  for an "@:@" entry to
  3624.                 exist in the alias database before  starting
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635. SSMMMM::0088--6600          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3636.  
  3637.  
  3638.                 up.   If  it  does not appear in the _t_i_m_e_o_u_t
  3639.                 interval  rebuild  the  database   (if   the
  3640.                 AAuuttooRReebbuuiillddAAlliiaasseess  option  is  also set) or
  3641.                 issue a warning.
  3642.  
  3643.       AutoRebuildAliases
  3644.                 [D] If set, rebuild the  alias  database  if
  3645.                 necessary  and  possible.  If this option is
  3646.                 not set, _s_e_n_d_m_a_i_l  will  never  rebuild  the
  3647.                 alias  database  unless explicitly requested
  3648.                 using --bbii.  Not  recommended  --  can  cause
  3649.                 thrashing.
  3650.  
  3651.       BlankSub=_c
  3652.                 [B]  Set the blank substitution character to
  3653.                 _c.   Unquoted  spaces   in   addresses   are
  3654.                 replaced  by  this  character.   Defaults to
  3655.                 space (i.e., no change is made).
  3656.  
  3657.       CheckAliases
  3658.                 [n]  Validate  the  RHS  of   aliases   when
  3659.                 rebuilding the alias database.
  3660.  
  3661.       CheckpointInterval=_N
  3662.                 [C]  Checkpoints  the queue every _N (default
  3663.                 10) addresses sent.  If your system  crashes
  3664.                 during  delivery  to a large list, this pre-
  3665.                 vents retransmission to  any  but  the  last
  3666.                 recipients.
  3667.  
  3668.       ClassFactor=_f_a_c_t
  3669.                 [z]  The  indicated  _f_a_c_tor is multiplied by
  3670.                 the message class (determined by the  Prece-
  3671.                 dence:  field  in  the user header and the PP
  3672.                 lines in the configuration  file)  and  sub-
  3673.                 tracted  from  the priority.  Thus, messages
  3674.                 with a higher  Priority:  will  be  favored.
  3675.                 Defaults to 1800.
  3676.  
  3677.       ColonOkInAddr
  3678.                 [no  short  name] If set, colons are accept-
  3679.                 able    in    e-mail    addresses     (e.g.,
  3680.                 "host:user").   If  not set, colons indicate
  3681.                 the beginning of a RFC 822  group  construct
  3682.                 ("groupname:   member1,  member2,  ...  mem-
  3683.                 berN;").  Doubled colons are always  accept-
  3684.                 able  ("nodename::user")  and  proper route-
  3685.                 addr       nesting       is       understood
  3686.                 ("<@relay:user@host>").   Furthermore,  this
  3687.                 option defaults on if the configuration ver-
  3688.                 sion level is less than 6 (for back compati-
  3689.                 bility).  However, it must be off  for  full
  3690.                 compatibility with RFC 822.
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--6611
  3702.  
  3703.  
  3704.       ConnectionCacheSize=_N
  3705.                 [k]  The  maximum number of open connections
  3706.                 that will be cached at a time.  The  default
  3707.                 is  one.   This  delays  closing the current
  3708.                 connection until either this  invocation  of
  3709.                 _s_e_n_d_m_a_i_l needs to connect to another host or
  3710.                 it terminates.  Setting it to zero  defaults
  3711.                 to  the  old  behavior, that is, connections
  3712.                 are closed immediately.  Since this consumes
  3713.                 file   descriptors,   the  connection  cache
  3714.                 should be kept small: 4 is probably a  prac-
  3715.                 tical maximum.
  3716.  
  3717.       ConnectionCacheTimeout=_t_i_m_e_o_u_t
  3718.                 [K] The maximum amount of time a cached con-
  3719.                 nection will be permitted  to  idle  without
  3720.                 activity.   If  this  time  is exceeded, the
  3721.                 connection  is  immediately  closed.    This
  3722.                 value  should  be small (on the order of ten
  3723.                 minutes).  Before  _s_e_n_d_m_a_i_l  uses  a  cached
  3724.                 connection,  it  always sends a RSET command
  3725.                 to check the connection; if this  fails,  it
  3726.                 reopens the connection.  This keeps your end
  3727.                 from failing if the  other  end  times  out.
  3728.                 The  point  of  this  option is to be a good
  3729.                 network neighbor and avoid using  up  exces-
  3730.                 sive   resources  on  the  other  end.   The
  3731.                 default is five minutes.
  3732.  
  3733.       DaemonPortOptions=_o_p_t_i_o_n_s
  3734.                 [O] Set server SMTP  options.   The  options
  3735.                 are _k_e_y_=_v_a_l_u_e pairs.  Known keys are:
  3736.  
  3737.                     Port      Name/number of listening port (defaults to "smtp")
  3738.                     Addr      Address mask (defaults INADDR_ANY)
  3739.                     Family    Address family (defaults to INET)
  3740.                     Listen    Size of listen queue (defaults to 10)
  3741.                     SndBufSizeSize of TCP send buffer
  3742.                     RcvBufSizeSize of TCP receive buffer
  3743.  
  3744.                 The _A_d_d_ress mask may be a numeric address in
  3745.                 dot notation or a network name.
  3746.  
  3747.       DefaultCharSet=_c_h_a_r_s_e_t
  3748.                 [no short name]  When  a  message  that  has
  3749.                 8-bit  characters  but is not in MIME format
  3750.                 is converted to MIME (see  the  EightBitMode
  3751.                 option)  a character set must be included in
  3752.                 the Content-Type:  header.   This  character
  3753.                 set  is normally set from the Charset= field
  3754.                 of the mailer descriptor.  If  that  is  not
  3755.                 set,  the  value of this option is used.  If
  3756.                 this  option   is   not   set,   the   value
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767. SSMMMM::0088--6622          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3768.  
  3769.  
  3770.                 "unknown-8bit" is used.
  3771.  
  3772.       DefaultUser=_u_s_e_r_:_g_r_o_u_p
  3773.                 [u]  Set  the  default userid for mailers to
  3774.                 _u_s_e_r_:_g_r_o_u_p.  If _g_r_o_u_p is omitted and _u_s_e_r is
  3775.                 a  user  name  (as opposed to a numeric user
  3776.                 id)  the  default  group   listed   in   the
  3777.                 /etc/passwd  file  for  that user is used as
  3778.                 the default group.  Both _u_s_e_r and _g_r_o_u_p  may
  3779.                 be  numeric.   Mailers without the _S flag in
  3780.                 the mailer definition will run as this user.
  3781.                 Defaults  to  1:1.   The  value  can also be
  3782.                 given as a symbolic user name.18
  3783.  
  3784.       DeliveryMode=_x
  3785.                 [d] Deliver in mode _x.  Legal modes are:
  3786.  
  3787.                     i   Deliver interactively (synchronously)
  3788.                     b   Deliver in background (asynchronously)
  3789.                     q   Just queue the message (deliver during queue run)
  3790.                     d   Defer delivery and all map lookups (deliver during queue run)
  3791.  
  3792.                 Defaults to ``b'' if no option is specified,
  3793.                 ``i'' if it is specified but given no  argu-
  3794.                 ment   (i.e.,   ``Od''   is   equivalent  to
  3795.                 ``Odi'').  The --vv  command  line  flag  sets
  3796.                 this to ii.
  3797.  
  3798.       DialDelay=_s_l_e_e_p_t_i_m_e
  3799.                 [no  short name] Dial-on-demand network con-
  3800.                 nections can see timeouts if a connection is
  3801.                 opened  before  the call is set up.  If this
  3802.                 is set to an interval and a connection times
  3803.                 out  on the first connection being attempted
  3804.                 _s_e_n_d_m_a_i_l will sleep for this amount of  time
  3805.                 and try again.  This should give your system
  3806.                 time to establish  the  connection  to  your
  3807.                 service provider.  Units default to seconds,
  3808.                 so "DialDelay=5" uses a five  second  delay.
  3809.                 Defaults to zero (no retry).
  3810.  
  3811.       DontExpandCnames
  3812.                 [no  short  name] The standards say that all
  3813.                 host addresses used in a mail  message  must
  3814.                 be  fully  canonical.   For example, if your
  3815.                 host is named "Cruft.Foo.ORG" and  also  has
  3816.                 an  alias  of "FTP.Foo.ORG", the former name
  3817.                 must be used at all times.  This is enforced
  3818. ____________________
  3819.    18The old gg option has been combined into the DDeeffaauullttUUsseerr
  3820. option.
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--6633
  3834.  
  3835.  
  3836.                 during  host  name canonification ($[ ... $]
  3837.                 lookups).  If this option is set, the proto-
  3838.                 cols  are  ignored  and the "wrong" thing is
  3839.                 done.  However, the IETF  is  moving  toward
  3840.                 changing this standard, so the behaviour may
  3841.                 become acceptable.  Please note  that  hosts
  3842.                 downstream  may still rewrite the address to
  3843.                 be the true canonical name however.
  3844.  
  3845.       DontInitGroups
  3846.                 [no short name] If set, _s_e_n_d_m_a_i_l will  avoid
  3847.                 using  the  initgroups(3)  call.  If you are
  3848.                 running NIS, this causes a  sequential  scan
  3849.                 of  the  groups.byname  map, which can cause
  3850.                 your NIS server to be badly overloaded in  a
  3851.                 large  domain.  The cost of this is that the
  3852.                 only group found for  users  will  be  their
  3853.                 primary  group  (the  one  in  the  password
  3854.                 file), which will make file  access  permis-
  3855.                 sions  somewhat  more  restrictive.   Has no
  3856.                 effect on  systems  that  don't  have  group
  3857.                 lists.
  3858.  
  3859.       DontPruneRoutes
  3860.                 [R]  Normally,  _s_e_n_d_m_a_i_l  tries to eliminate
  3861.                 any unnecessary explicit routes when sending
  3862.                 an  error  message (as discussed in RFC 1123
  3863.                 5.2.6).  For example, when sending an  error
  3864.                 message to
  3865.  
  3866.                     <@known1,@known2,@known3:user@unknown>
  3867.  
  3868.                 _s_e_n_d_m_a_i_l      will     strip     off     the
  3869.                 "@known1,@known2" in order to make the route
  3870.                 as  direct  as  possible.  However, if the RR
  3871.                 option is set, this will  be  disabled,  and
  3872.                 the  mail  will be sent to the first address
  3873.                 in the route, even if  later  addresses  are
  3874.                 known.  This may be useful if you are caught
  3875.                 behind a firewall.
  3876.  
  3877.       EightBitMode=_a_c_t_i_o_n
  3878.                 [8] Set handling of eight-bit  data.   There
  3879.                 are   two  kinds  of  eight-bit  data:  that
  3880.                 declared as  such  using  the  BBOODDYY==88BBIITTMMIIMMEE
  3881.                 ESMTP  declaration or the --BB88BBIITTMMIIMMEE command
  3882.                 line flag, and undeclared 8-bit  data,  that
  3883.                 is,  input  that  just  happens  to be eight
  3884.                 bits.  There are three basic operations that
  3885.                 can  happen:  undeclared  8-bit  data can be
  3886.                 automatically converted to  8BITMIME,  unde-
  3887.                 clared  8-bit data can be passed as-is with-
  3888.                 out conversion to MIME  (``just  send  8''),
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899. SSMMMM::0088--6644          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  3900.  
  3901.  
  3902.                 and  declared 8-bit data can be converted to
  3903.                 7-bits for transmission  to  a  non-8BITMIME
  3904.                 mailer.  The possible _a_c_t_i_o_ns are:
  3905.  
  3906.                       s Reject undeclared 8-bit data (``strict'')
  3907.                       m Convert undeclared 8-bit data to MIME (``mime'')
  3908.                       p Pass undeclared 8-bit data (``pass'')
  3909.  
  3910.                 In all cases properly declared 8BITMIME data
  3911.                 will be converted to 7BIT as needed.
  3912.  
  3913.       ErrorHeader=_f_i_l_e_-_o_r_-_m_e_s_s_a_g_e
  3914.                 [E] Prepend error messages  with  the  indi-
  3915.                 cated  message.   If it begins with a slash,
  3916.                 it is assumed to be the pathname of  a  file
  3917.                 containing  a  message  (this  is the recom-
  3918.                 mended setting).  Otherwise, it is a literal
  3919.                 message.   The  error file might contain the
  3920.                 name, email address, and/or phone number  of
  3921.                 a  local postmaster who could provide assis-
  3922.                 tance in to end users.   If  the  option  is
  3923.                 missing or null, or if it names a file which
  3924.                 does not exist or which is not readable,  no
  3925.                 message is printed.
  3926.  
  3927.       ErrorMode=_x
  3928.                 [e]  Dispose  of  errors  using mode _x.  The
  3929.                 values for _x are:
  3930.  
  3931.                     p   Print error messages (default)
  3932.                     q   No messages, just give exit status
  3933.                     m   Mail back errors
  3934.                     w   Write back errors (mail if user not logged in)
  3935.                     e   Mail back errors and give zero exit stat always
  3936.  
  3937.  
  3938.       FallbackMXhost=_f_a_l_l_b_a_c_k_h_o_s_t
  3939.                 [V] If specified, the _f_a_l_l_b_a_c_k_h_o_s_t acts like
  3940.                 a  very low priority MX on every host.  This
  3941.                 is intended to be used by  sites  with  poor
  3942.                 network connectivity.
  3943.  
  3944.       ForkEachJob
  3945.                 [Y]  If  set,  deliver  each job that is run
  3946.                 from the queue in a separate  process.   Use
  3947.                 this  option  if  you  are  short of memory,
  3948.                 since the default tends to consume consider-
  3949.                 able  amounts  of  memory while the queue is
  3950.                 being processed.
  3951.  
  3952.       ForwardPath=_p_a_t_h
  3953.                 [J] Set the path for  searching  for  users'
  3954.                 .forward     files.     The    default    is
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--6655
  3966.  
  3967.  
  3968.                 "$z/.forward".   Some  sites  that  use  the
  3969.                 automounter  may  prefer  to  change this to
  3970.                 "/var/forward/$u" to search a file with  the
  3971.                 same name as the user in a system directory.
  3972.                 It can also be set to a  sequence  of  paths
  3973.                 separated  by  colons; _s_e_n_d_m_a_i_l stops at the
  3974.                 first file it can  successfully  and  safely
  3975.                 open.               For             example,
  3976.                 "/var/forward/$u:$z/.forward"  will   search
  3977.                 first  in  /var/forward/_u_s_e_r_n_a_m_e and then in
  3978.                 _~_u_s_e_r_n_a_m_e/.forward (but only  if  the  first
  3979.                 file does not exist).
  3980.  
  3981.       HelpFile=_f_i_l_e
  3982.                 [H] Specify the help file for SMTP.
  3983.  
  3984.       HoldExpensive
  3985.                 [c] If an outgoing mailer is marked as being
  3986.                 expensive, don't connect immediately.   This
  3987.                 requires that queueing be compiled in, since
  3988.                 it will depend on a  queue  run  process  to
  3989.                 actually send the mail.
  3990.  
  3991.       IgnoreDots
  3992.                 [i]  Ignore dots in incoming messages.  This
  3993.                 is always disabled (that is, dots are always
  3994.                 accepted) when reading SMTP mail.
  3995.  
  3996.       LogLevel=_n
  3997.                 [L]   Set   the  default  log  level  to  _n.
  3998.                 Defaults to 9.
  3999.  
  4000.       M_x_v_a_l_u_e   [no long version] Set the macro _x to  _v_a_l_u_e.
  4001.                 This  is intended only for use from the com-
  4002.                 mand line.  The --MM flag is preferred.
  4003.  
  4004.       MatchGECOS
  4005.                 [G] Allow fuzzy matching on the GECOS field.
  4006.                 If this flag is set, and the usual user name
  4007.                 lookups fail (that is,  there  is  no  alias
  4008.                 with   this  name  and  a  _g_e_t_p_w_n_a_m  fails),
  4009.                 sequentially search the password file for  a
  4010.                 matching  entry  in  the  GECOS field.  This
  4011.                 also requires that MATCHGECOS be  turned  on
  4012.                 during compilation.  This option is not rec-
  4013.                 ommended.
  4014.  
  4015.       MaxHopCount=_N
  4016.                 [h] The maximum hop  count.   Messages  that
  4017.                 have  been  processed  more than _N times are
  4018.                 assumed to be in a loop  and  are  rejected.
  4019.                 Defaults to 25.
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031. SSMMMM::0088--6666          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4032.  
  4033.  
  4034.       MaxHostStatAge=_a_g_e
  4035.                 [no  short  name] Not yet implemented.  This
  4036.                 option specifies how long host status infor-
  4037.                 mation  will be retained.  For example, if a
  4038.                 host is found to  be  down,  connections  to
  4039.                 that  host  will  not  be  retried  for this
  4040.                 interval.  The units default to minutes.
  4041.  
  4042.       MaxQueueRunSize=_N
  4043.                 [no short name] The maximum number  of  jobs
  4044.                 that  will  be  processed  in a single queue
  4045.                 run.  If not set, there is no limit  on  the
  4046.                 size.   If  you  have very large queues or a
  4047.                 very short queue run interval this could  be
  4048.                 unstable.   However,  since the first _N jobs
  4049.                 in queue directory  order  are  run  (rather
  4050.                 than  the  _N  highest  priority  jobs)  this
  4051.                 should be set as high as possible  to  avoid
  4052.                 "losing"  jobs  that  happen to fall late in
  4053.                 the queue directory.
  4054.  
  4055.       MeToo     [m] Send to me too, even if I am in an alias
  4056.                 expansion.
  4057.  
  4058.       MaxMessageSize=_N
  4059.                 [no  short name] Specify the maximum message
  4060.                 size to be  advertised  in  the  ESMTP  EHLO
  4061.                 response.  Messages larger than this will be
  4062.                 rejected.
  4063.  
  4064.       MinFreeBlocks=_N
  4065.                 [b] Insist on at least _N blocks free on  the
  4066.                 filesystem that holds the queue files before
  4067.                 accepting  email  via  SMTP.   If  there  is
  4068.                 insufficient  space  _s_e_n_d_m_a_i_l  gives  a  452
  4069.                 response to the MAIL command.  This  invites
  4070.                 the sender to try again later.
  4071.  
  4072.       MinQueueAge=age
  4073.                 [no  short  name]  Don't  process any queued
  4074.                 jobs that have been in the queue  less  than
  4075.                 the   indicated   time  interval.   This  is
  4076.                 intended to allow you to get  responsiveness
  4077.                 by  processing  the  queue fairly frequently
  4078.                 without thrashing your system by trying jobs
  4079.                 too often.  The default units are minutes.
  4080.  
  4081.       NoRecipientAction
  4082.                 [no  short name] The action to take when you
  4083.                 receive a message that has no valid  recipi-
  4084.                 ent  headers  (To:,  Cc:,  Bcc:).  It can be
  4085.                 NNoonnee to  pass  the  message  on  unmodified,
  4086.                 which violates the protocol, AAdddd--TToo to add a
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--6677
  4098.  
  4099.  
  4100.                 To: header with any recipients it  can  find
  4101.                 in  the  envelope  (which  might expose Bcc:
  4102.                 recipients),  AAdddd--AAppppaarreennttllyy--TToo  to  add  an
  4103.                 Apparently-To:  header  (this  is  only  for
  4104.                 back-compatibility and is officially  depre-
  4105.                 cated),  AAdddd--TToo--UUnnddiisscclloosseedd  to add a header
  4106.                 "To: undisclosed-recipients:;" to  make  the
  4107.                 header legal without disclosing anything, or
  4108.                 AAdddd--BBcccc to add an empty Bcc: header.
  4109.  
  4110.       OldStyleHeaders
  4111.                 [o] Assume that the headers may  be  in  old
  4112.                 format,  i.e.,  spaces  delimit names.  This
  4113.                 actually turns on an adaptive algorithm:  if
  4114.                 any  recipient  address  contains  a  comma,
  4115.                 parenthesis, or angle bracket,  it  will  be
  4116.                 assumed  that commas already exist.  If this
  4117.                 flag is not on, only commas  delimit  names.
  4118.                 Headers   are   always  output  with  commas
  4119.                 between the names.  Defaults to off.
  4120.  
  4121.       OperatorChars=_c_h_a_r_l_i_s_t
  4122.                 [$o macro] The list of characters  that  are
  4123.                 considered to be "operators", that is, char-
  4124.                 acters that delimit  tokens.   All  operator
  4125.                 characters   are   tokens   by   themselves;
  4126.                 sequences  of  non-operator  characters  are
  4127.                 also  tokens.   White space characters sepa-
  4128.                 rate tokens but are not tokens themselves --
  4129.                 for example, "AAA.BBB" has three tokens, but
  4130.                 "AAA BBB" has two.  If  not  set,  Operator-
  4131.                 Chars defaults to ".:@[]"; additionally, the
  4132.                 characters "()<>,;" are always operators.
  4133.  
  4134.       PostmasterCopy=_p_o_s_t_m_a_s_t_e_r
  4135.                 [P] If set, copies of error messages will be
  4136.                 sent  to  the  named  _p_o_s_t_m_a_s_t_e_r.   Only the
  4137.                 header of the failed message is sent.  Since
  4138.                 most errors are user problems, this is prob-
  4139.                 ably not a good idea  on  large  sites,  and
  4140.                 arguably  contains all sorts of privacy vio-
  4141.                 lations, but it seems  to  be  popular  with
  4142.                 certain operating systems vendors.  Defaults
  4143.                 to no postmaster copies.
  4144.  
  4145.       PrivacyOptions=_o_p_t_,_o_p_t_,_._._.
  4146.                 [p] Set the privacy _o_p_tions.  ``Privacy'' is
  4147.                 really  a misnomer; many of these are just a
  4148.                 way of insisting on  stricter  adherence  to
  4149.                 the  SMTP  protocol.   The  _o_p_tions  can  be
  4150.                 selected from:
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163. SSMMMM::0088--6688          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4164.  
  4165.  
  4166.                     public         Allow open access
  4167.                     needmailhelo   Insist on HELO or EHLO command before MAIL
  4168.                     needexpnhelo   Insist on HELO or EHLO command before EXPN
  4169.                     noexpn         Disallow EXPN entirely
  4170.                     needvrfyhelo   Insist on HELO or EHLO command before VRFY
  4171.                     novrfy         Disallow VRFY entirely
  4172.                     restrictmailq  Restrict mailq command
  4173.                     restrictqrun   Restrict -q command line flag
  4174.                     noreceipts     Don't return success DSNs
  4175.                     goaway         Disallow essentially all SMTP status queries
  4176.                     authwarnings   Put X-Authentication-Warning: headers in messages
  4177.  
  4178.                 The  "goaway"  pseudo-flag  sets  all  flags
  4179.                 except  "restrictmailq"  and "restrictqrun".
  4180.                 If mailq is restricted, only people  in  the
  4181.                 same  group as the queue directory can print
  4182.                 the queue.  If queue  runs  are  restricted,
  4183.                 only  root and the owner of the queue direc-
  4184.                 tory  can  run  the  queue.   Authentication
  4185.                 Warnings  add  warnings about various condi-
  4186.                 tions that may indicate  attempts  to  spoof
  4187.                 the  mail  system,  such  as  using  an non-
  4188.                 standard queue directory.
  4189.  
  4190.       QueueDirectory=_d_i_r
  4191.                 [Q] Use the named _d_i_r as  the  queue  direc-
  4192.                 tory.
  4193.  
  4194.       QueueFactor=_f_a_c_t_o_r
  4195.                 [q]  Use _f_a_c_t_o_r as the multiplier in the map
  4196.                 function to decide when  to  just  queue  up
  4197.                 jobs  rather  than  run them.  This value is
  4198.                 divided by the difference between  the  cur-
  4199.                 rent load average and the load average limit
  4200.                 (QQuueeuueeLLAA option) to  determine  the  maximum
  4201.                 message   priority   that   will   be  sent.
  4202.                 Defaults to 600000.
  4203.  
  4204.       QueueLA=_L_A
  4205.                 [x] When the system load average exceeds _L_A,
  4206.                 just queue messages (i.e., don't try to send
  4207.                 them).  Defaults to 8.
  4208.  
  4209.       QueueSortOrder=_a_l_g_o_r_i_t_h_m
  4210.                 [no short name] Sets the _a_l_g_o_r_i_t_h_m used  for
  4211.                 sorting the queue.  Only the first character
  4212.                 of the value  is  used.   Legal  values  are
  4213.                 "host"  (to  order  by the name of the first
  4214.                 host name of the first recipient) and  "pri-
  4215.                 ority"  (to order strictly by message prior-
  4216.                 ity).  Host ordering makes better use of the
  4217.                 connection  cache,  but  may tend to process
  4218.                 low priority messages that go  to  a  single
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--6699
  4230.  
  4231.  
  4232.                 host  over high priority messages that go to
  4233.                 several hosts; it probably shouldn't be used
  4234.                 on slow network links.  Priority ordering is
  4235.                 the default.
  4236.  
  4237.       ResolverOptions=_o_p_t_i_o_n_s
  4238.                 [I] Set resolver options.  Values can be set
  4239.                 using  ++_f_l_a_g  and  cleared  using --_f_l_a_g; the
  4240.                 _f_l_a_gs can  be  "debug",  "aaonly",  "usevc",
  4241.                 "primary",  "igntc",  "recurse", "defnames",
  4242.                 "stayopen",   or   "dnsrch".    The   string
  4243.                 "HasWildcardMX"  (without  a  ++ or --) can be
  4244.                 specified to turn off  matching  against  MX
  4245.                 records  when  doing  name  canonifications.
  4246.                 NN..BB..  Prior to 8.7,  this  option  indicated
  4247.                 that  the name server be responding in order
  4248.                 to accept addresses.  This has been replaced
  4249.                 by  checking  to  see if the "dns" method is
  4250.                 listed in the service switch entry  for  the
  4251.                 "hosts" service.
  4252.  
  4253.       SmtpGreetingMessage=_m_e_s_s_a_g_e
  4254.                 [$e macro] The message printed when the SMTP
  4255.                 server starts up.  Defaults to "$j  Sendmail
  4256.                 $v ready at $b".
  4257.  
  4258.       Timeout._t_y_p_e=_t_i_m_e_o_u_t
  4259.                 [r; subsumes old T option as well] Set time-
  4260.                 out values.  The actual timeout is indicated
  4261.                 by  the  _t_y_p_e.   The recognized timeouts and
  4262.                 their default values, and their minimum val-
  4263.                 ues specified in RFC 1123 section 5.3.2 are:
  4264.  
  4265.                     initial     wait for initial greeting message [5m, 5m]
  4266.                     helo        reply to HELO or EHLO command [5m, none]
  4267.                     mail        reply to MAIL command [10m, 5m]
  4268.                     rcpt        reply to RCPT command [1h, 5m]
  4269.                     datainit    reply to DATA command [5m, 2m]
  4270.                     datablock   data block read [1h, 3m]
  4271.                     datafinal   reply to final ``.'' in data [1h, 10m]
  4272.                     rset        reply to RSET command [5m, none]
  4273.                     quit        reply to QUIT command [2m, none]
  4274.                     misc        reply to NOOP and VERB commands [2m, none]
  4275.                     ident       IDENT protocol timeout [30s, none]
  4276.                     fileopen    timeout on opening .forward and :include: files [60s, none]
  4277.                     command     command read [1h, 5m]
  4278.                     queuereturn how long until a message is returned [5d, 5d]
  4279.                     queuewarn   how long until a warning is sent [none, none]
  4280.  
  4281.                 All but those marked with a dagger ()  apply
  4282.                 to client SMTP.  If the message is submitted
  4283.                 using the  NOTIFY  SMTP  extension,  warning
  4284.                 messages  will  only be sent if NOTIFY=DELAY
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295. SSMMMM::0088--7700          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4296.  
  4297.  
  4298.                 is specified.  The queuereturn and queuewarn
  4299.                 timeouts can be further qualified with a tag
  4300.                 based on the Precedence: field in  the  mes-
  4301.                 sage; they must be one of "urgent" (indicat-
  4302.                 ing a positive non-zero precedence) "normal"
  4303.                 (indicating  a  zero  precedence),  or "non-
  4304.                 urgent" (indicating  negative  precedences).
  4305.                 For       example,       setting      "Time-
  4306.                 out.queuewarn.urgent=1h"  sets  the  warning
  4307.                 timeout  for  urgent  messages  only  to one
  4308.                 hour.  The default if no precedence is indi-
  4309.                 cated  is  to set the timeout for all prece-
  4310.                 dences.
  4311.  
  4312.       RecipientFactor=_f_a_c_t
  4313.                 [y] The indicated _f_a_c_tor  is  added  to  the
  4314.                 priority  (thus _l_o_w_e_r_i_n_g the priority of the
  4315.                 job) for each recipient,  i.e.,  this  value
  4316.                 penalizes jobs with large numbers of recipi-
  4317.                 ents.  Defaults to 30000.
  4318.  
  4319.       RefuseLA=_L_A
  4320.                 [X] When the system load average exceeds _L_A,
  4321.                 refuse  incoming SMTP connections.  Defaults
  4322.                 to 12.
  4323.  
  4324.       RetryFactor=_f_a_c_t
  4325.                 [Z] The _f_a_c_tor  is  added  to  the  priority
  4326.                 every  time  a job is processed.  Thus, each
  4327.                 time a job is processed, its  priority  will
  4328.                 be  decreased  by  the  indicated value.  In
  4329.                 most environments this should  be  positive,
  4330.                 since  hosts that are down are all too often
  4331.                 down for a long time.  Defaults to 90000.
  4332.  
  4333.       SaveFromLine
  4334.                 [f] Save  Unix-style  "From"  lines  at  the
  4335.                 front of headers.  Normally they are assumed
  4336.                 redundant and discarded.
  4337.  
  4338.       SendMIMEErrors
  4339.                 [j] If set, send error messages in MIME for-
  4340.                 mat (see RFC1521 and RFC1344 for details).
  4341.  
  4342.       ServiceSwitchFile=_f_i_l_e_n_a_m_e
  4343.                 [no  short name] If your host operating sys-
  4344.                 tem has a service switch abstraction  (e.g.,
  4345.                 /etc/nsswitch.conf     on     Solaris     or
  4346.                 /etc/svc.conf on Ultrix and DEC OSF/1)  that
  4347.                 service will be consulted and this option is
  4348.                 ignored.  Otherwise, this is the name  of  a
  4349.                 file  that provides the list of methods used
  4350.                 to  implement  particular   services.    The
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--7711
  4362.  
  4363.  
  4364.                 syntax  is  a series of lines, each of which
  4365.                 is a sequence of words.  The first  word  is
  4366.                 the  service  name,  and following words are
  4367.                 service types.  The services  that  _s_e_n_d_m_a_i_l
  4368.                 consults directly are "aliases" and "hosts."
  4369.                 Service types can  be  "dns",  "nis",  "nis-
  4370.                 plus",  or "files" (with the caveat that the
  4371.                 appropriate  support  must  be  compiled  in
  4372.                 before  the  service can be referenced).  If
  4373.                 ServiceSwitchFile  is  not   specified,   it
  4374.                 defaults  to  /etc/service.switch.   If that
  4375.                 file does not exist, the default switch is:
  4376.  
  4377.                     aliases     files
  4378.                     hosts       dns nis files
  4379.  
  4380.                 The default file is "/etc/service.switch".
  4381.  
  4382.       SevenBitInput
  4383.                 [7] Strip input to seven bits  for  compati-
  4384.                 bility  with old systems.  This shouldn't be
  4385.                 necessary.
  4386.  
  4387.       StatusFile=_f_i_l_e
  4388.                 [S] Log  summary  statistics  in  the  named
  4389.                 _f_i_l_e.  If not set, no summary statistics are
  4390.                 saved.  This file does not grow in size.  It
  4391.                 can  be  printed using the _m_a_i_l_s_t_a_t_s(8) pro-
  4392.                 gram.
  4393.  
  4394.       SuperSafe [s] Be super-safe when running things, i.e.,
  4395.                 always  instantiate  the queue file, even if
  4396.                 you are going to attempt immediate delivery.
  4397.                 _S_e_n_d_m_a_i_l  always instantiates the queue file
  4398.                 before returning control  the  client  under
  4399.                 any   circumstances.    This  should  really
  4400.                 _a_l_w_a_y_s be set.
  4401.  
  4402.       TempFileMode=_m_o_d_e
  4403.                 [F] The file mode for queue  files.   It  is
  4404.                 interpreted  in  octal by default.  Defaults
  4405.                 to 0600.
  4406.  
  4407.       TimeZoneSpec=_t_z_i_n_f_o
  4408.                 [t] Set the local time zone info  to  _t_z_i_n_f_o
  4409.                 --  for  example,  "PST8PDT".   Actually, if
  4410.                 this is not set, the TZ environment variable
  4411.                 is  cleared (so the system default is used);
  4412.                 if set but null, the user's TZ  variable  is
  4413.                 used,  and  if set and non-null the TZ vari-
  4414.                 able is set to this value.
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427. SSMMMM::0088--7722          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4428.  
  4429.  
  4430.       TryNullMXList
  4431.                 [w] If this system is the "best"  (that  is,
  4432.                 lowest  preference) MX for a given host, its
  4433.                 configuration rules should  normally  detect
  4434.                 this situation and treat that condition spe-
  4435.                 cially by forwarding  the  mail  to  a  UUCP
  4436.                 feed,  treating  it  as  local, or whatever.
  4437.                 However, in some  cases  (such  as  Internet
  4438.                 firewalls)  you  may  want to try to connect
  4439.                 directly to that host as though it had no MX
  4440.                 records  at all.  Setting this option causes
  4441.                 _s_e_n_d_m_a_i_l to try this.  The downside is  that
  4442.                 errors  in  your configuration are likely to
  4443.                 be diagnosed as "host unknown"  or  "message
  4444.                 timed  out"  instead of something more mean-
  4445.                 ingful.  This option is disrecommended.
  4446.  
  4447.       UnixFromLine=_f_r_o_m_l_i_n_e
  4448.                 [$l macro]  Defines  the  format  used  when
  4449.                 _s_e_n_d_m_a_i_l  must  add  a UNIX-style From_ line
  4450.                 (that     is,     a      line      beginning
  4451.                 "From<space>user").   Defaults  to  "From $g
  4452.                 $d".  Don't change this unless  your  system
  4453.                 uses  a  different UNIX mailbox format (very
  4454.                 unlikely).
  4455.  
  4456.       UseErrorsTo
  4457.                 [l] If there is an "Errors-To:" header, send
  4458.                 error   messages  to  the  addresses  listed
  4459.                 there.  They normally  go  to  the  envelope
  4460.                 sender.   Use of this option causes _s_e_n_d_m_a_i_l
  4461.                 to violate RFC 1123.  This option is disrec-
  4462.                 ommended and deprecated.
  4463.  
  4464.       UserDatabaseSpec=_u_d_b_s_p_e_c
  4465.                 [U] The user database specification.
  4466.  
  4467.       Verbose   [v]  Run  in  verbose mode.  If this is set,
  4468.                 _s_e_n_d_m_a_i_l adjusts options HHoollddEExxppeennssiivvee  (old
  4469.                 cc) and DDeelliivveerryyMMooddee (old dd) so that all mail
  4470.                 is delivered completely in a single  job  so
  4471.                 that  you  can  see the entire delivery pro-
  4472.                 cess.  Option VVeerrbboossee should _n_e_v_e_r be set in
  4473.                 the  configuration  file; it is intended for
  4474.                 command line use only.
  4475.  
  4476.       All options can be specified on the command line using
  4477.       the  -O  or  -o  flag, but most will cause _s_e_n_d_m_a_i_l to
  4478.       relinquish its setuid permissions.  The  options  that
  4479.       will  not  cause this are MinFreeBlocks [b], Delivery-
  4480.       Mode [d], ErrorMode [e], IgnoreDots [i], LogLevel [L],
  4481.       MeToo  [m],  OldStyleHeaders  [o], PrivacyOptions [p],
  4482.       Timeouts   [r],   SuperSafe    [s],    Verbose    [v],
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--7733
  4494.  
  4495.  
  4496.       CheckpointInterval  [C], and SevenBitInput [7].  Also,
  4497.       M (define macro) when defining the r or  s  macros  is
  4498.       also considered "safe".
  4499.  
  4500.    55..77..  PP ---- PPrreecceeddeennccee DDeeffiinniittiioonnss
  4501.  
  4502.            Values for the "Precedence:" field may be defined
  4503.       using the PP control line.  The syntax  of  this  field
  4504.       is:
  4505.  
  4506.           PP_n_a_m_e==_n_u_m
  4507.  
  4508.       When  the  _n_a_m_e is found in a "Precedence:" field, the
  4509.       message class is set  to  _n_u_m.   Higher  numbers  mean
  4510.       higher  precedence.   Numbers  less than zero have the
  4511.       special property that if an error occurs  during  pro-
  4512.       cessing  the body of the message will not be returned;
  4513.       this is expected to be used for "bulk"  mail  such  as
  4514.       through  mailing  lists.   The  default  precedence is
  4515.       zero.  For example, our list of precedences is:
  4516.  
  4517.           Pfirst-class=0
  4518.           Pspecial-delivery=100
  4519.           Plist=-30
  4520.           Pbulk=-60
  4521.           Pjunk=-100
  4522.  
  4523.       People writing mailing list exploders  are  encouraged
  4524.       to use "Precedence: list".  Older versions of _s_e_n_d_m_a_i_l
  4525.       (which discarded all error returns for negative prece-
  4526.       dences)  didn't  recognize  this  name,  giving  it  a
  4527.       default precedence of zero.  This  allows  list  main-
  4528.       tainers  to see error returns on both old and new ver-
  4529.       sions of _s_e_n_d_m_a_i_l.
  4530.  
  4531.    55..88..  VV ---- CCoonnffiigguurraattiioonn VVeerrssiioonn LLeevveell
  4532.  
  4533.            To provide compatibility with  old  configuration
  4534.       files,  the  VV line has been added to define some very
  4535.       basic semantics of the configuration file.  These  are
  4536.       not  intended  to  be long term supports; rather, they
  4537.       describe compatibility features which will probably be
  4538.       removed in future releases.
  4539.  
  4540.            NN..BB..::  these  version  _l_e_v_e_l_s  have nothing to do
  4541.       with the version _n_u_m_b_e_r on the files.  For example, as
  4542.       of  this writing version 8 config files (specifically,
  4543.       8.7) used version level 6 configurations.
  4544.  
  4545.            "Old" configuration files are defined as  version
  4546.       level one.  Version level two files make the following
  4547.       changes:
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559. SSMMMM::0088--7744          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4560.  
  4561.  
  4562.        (1)   Host name canonification ($[ ... $]) appends  a
  4563.              dot  if  the name is recognized; this gives the
  4564.              config file a way of finding  out  if  anything
  4565.              matched.   (Actually, this just initializes the
  4566.              "host" map with the  "-a."   flag  --  you  can
  4567.              reset  it  to  anything you prefer by declaring
  4568.              the map explicitly.)
  4569.  
  4570.        (2)   Default  host  name  extension  is   consistent
  4571.              throughout  processing;  version level one con-
  4572.              figurations turned off domain  extension  (that
  4573.              is,  adding  the local domain name) during cer-
  4574.              tain points in processing.  Version  level  two
  4575.              configurations are expected to include a trail-
  4576.              ing dot to indicate that the  name  is  already
  4577.              canonical.
  4578.  
  4579.        (3)   Local  names  that  are  not aliases are passed
  4580.              through a new distinguished ruleset five;  this
  4581.              can  be  used  to  append  a local relay.  This
  4582.              behaviour can be  prevented  by  resolving  the
  4583.              local name with an initial `@'.  That is, some-
  4584.              thing that resolves to a  local  mailer  and  a
  4585.              user  name  of  "vikki"  will be passed through
  4586.              ruleset five, but a user name of "@vikki"  will
  4587.              have  the  `@'  stripped,  will  not  be passed
  4588.              through ruleset five,  but  will  otherwise  be
  4589.              treated  the  same  as  the prior example.  The
  4590.              expectation is  that  this  might  be  used  to
  4591.              implement  a  policy where mail sent to "vikki"
  4592.              was handled by a central hub, but mail sent  to
  4593.              "vikki@localhost" was delivered directly.
  4594.  
  4595.            Version  level three files allow # initiated com-
  4596.       ments on all lines.  Exceptions are backslash  escaped
  4597.       # marks and the $# syntax.
  4598.  
  4599.            Version  level four configurations are completely
  4600.       equivalent to level three for historical reasons.
  4601.  
  4602.            Version level five configuration files change the
  4603.       default  definition  of $$ww to be just the first compo-
  4604.       nent of the hostname.
  4605.  
  4606.            Version level six configuration files change many
  4607.       of  the local processing options (such as aliasing and
  4608.       matching the beginning of the address for `|'  charac-
  4609.       ters)  to  be  mailer  flags; this allows fine-grained
  4610.       control over the special local processing.  Level  six
  4611.       configuration  files  may  also use long option names.
  4612.       The CCoolloonnOOkkIInnAAddddrr  option  (to  allow  colons  in  the
  4613.       local-part  of  addresses)  defaults oonn for lower num-
  4614.       bered  configuration  files;  the  configuration  file
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--7755
  4626.  
  4627.  
  4628.       requires some additional intelligence to properly han-
  4629.       dle the RFC 822 group construct.
  4630.  
  4631.            The VV line may have an optional //_v_e_n_d_o_r to  indi-
  4632.       cate  that  this configuration file uses modifications
  4633.       specific  to  a  particular  vendor19.   You  may  use
  4634.       "/Berkeley" to emphasize that this configuration  file
  4635.       uses the Berkeley dialect of _s_e_n_d_m_a_i_l.
  4636.  
  4637.    55..99..  KK ---- KKeeyy FFiillee DDeeccllaarraattiioonn
  4638.  
  4639.            Special maps can be defined using the line:
  4640.  
  4641.           Kmapname mapclass arguments
  4642.  
  4643.       The  _m_a_p_n_a_m_e is the handle by which this map is refer-
  4644.       enced in the rewriting rules.   The  _m_a_p_c_l_a_s_s  is  the
  4645.       name  of a type of map; these are compiled in to _s_e_n_d_-
  4646.       _m_a_i_l.  The _a_r_g_u_m_e_n_t_s are interpreted depending on  the
  4647.       class;  typically,  there  would  be a single argument
  4648.       naming the file containing the map.
  4649.  
  4650.            Maps are referenced using the syntax:
  4651.  
  4652.           $( _m_a_p _k_e_y $@ _a_r_g_u_m_e_n_t_s $: _d_e_f_a_u_l_t $)
  4653.  
  4654.       where either or both of the _a_r_g_u_m_e_n_t_s or _d_e_f_a_u_l_t  por-
  4655.       tion may be omitted.  The _$_@ _a_r_g_u_m_e_n_t_s may appear more
  4656.       than once.  The indicated _k_e_y and _a_r_g_u_m_e_n_t_s are passed
  4657.       to  the appropriate mapping function.  If it returns a
  4658.       value, it replaces the input.  If it does not return a
  4659.       value  and  the  _d_e_f_a_u_l_t  is  specified,  the  _d_e_f_a_u_l_t
  4660.       replaces  the  input.    Otherwise,   the   input   is
  4661.       unchanged.
  4662.  
  4663.            During  replacement  of  either  a  map  value or
  4664.       default the string  "%_n"  (where  _n  is  a  digit)  is
  4665.       replaced by the corresponding _a_r_g_u_m_e_n_t.  Argument zero
  4666.       is always the database key.  For example, the rule
  4667.  
  4668.           R$- ! $+       $: $(uucp $1 $@ $2 $: %1 @ %0 . UUCP $)
  4669.  
  4670.       Looks up the UUCP name in a (user defined)  UUCP  map;
  4671.       if  not  found  it  turns  it  into ".UUCP" form.  The
  4672.       database might contain records like:
  4673.  
  4674. ____________________
  4675.    19And of course, vendors are encouraged to add themselves
  4676. to  the  list  of  recognized vendors by editing the routine
  4677. _s_e_t_v_e_n_d_o_r  in  _c_o_n_f_._c.   Please   send   e-mail   to   send-
  4678. mail@CS.Berkeley.EDU to register your vendor dialect.
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691. SSMMMM::0088--7766          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4692.  
  4693.  
  4694.           decvax         %1@%0.DEC.COM
  4695.           research       %1@%0.ATT.COM
  4696.  
  4697.  
  4698.            The built in map with both name and class  "host"
  4699.       is  the  host name canonicalization lookup.  Thus, the
  4700.       syntax:
  4701.  
  4702.           $(host _h_o_s_t_n_a_m_e$)
  4703.  
  4704.       is equivalent to:
  4705.  
  4706.           $[_h_o_s_t_n_a_m_e$]
  4707.  
  4708.  
  4709.            There are many defined classes.
  4710.  
  4711.       dbm       Database lookups using the ndbm(3)  library.
  4712.                 _S_e_n_d_m_a_i_l  must be compiled with DDBBMM defined.
  4713.  
  4714.       btree     Database lookups using the  btree  interface
  4715.                 to  the  Berkeley  db(3)  library.  _S_e_n_d_m_a_i_l
  4716.                 must be compiled with NNEEWWDDBB defined.
  4717.  
  4718.       hash      Database lookups using the hash interface to
  4719.                 the  Berkeley  db(3) library.  _S_e_n_d_m_a_i_l must
  4720.                 be compiled with NNEEWWDDBB defined.
  4721.  
  4722.       nis       NIS lookups.  _S_e_n_d_m_a_i_l must be compiled with
  4723.                 NNIISS defined.
  4724.  
  4725.       nisplus   NIS+  lookups.   _S_e_n_d_m_a_i_l  must  be compiled
  4726.                 with NNIISSPPLLUUSS defined.  The argument  is  the
  4727.                 name  of  the  table to use for lookups, and
  4728.                 the --kk and --vv flags may be used to  set  the
  4729.                 key and value columns respectively.
  4730.  
  4731.       hesiod    Hesiod  lookups.   _S_e_n_d_m_a_i_l must be compiled
  4732.                 with HHEESSIIOODD defined.
  4733.  
  4734.       netinfo   NeXT NetInfo lookups.  _S_e_n_d_m_a_i_l must be com-
  4735.                 piled with NNEETTIINNFFOO defined.
  4736.  
  4737.       text      Text  file  lookups.  The format of the text
  4738.                 file is defined by the --kk  (key  field  num-
  4739.                 ber), --vv (value field number), and --zz (field
  4740.                 delimiter) flags.
  4741.  
  4742.       stab      Internal symbol table lookups.  Used  inter-
  4743.                 nally for aliasing.
  4744.  
  4745.       implicit  Really  should  be called "alias" -- this is
  4746.                 used to get the default  lookups  for  alias
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--7777
  4758.  
  4759.  
  4760.                 files,  and  is  the  default if no class is
  4761.                 specified for alias files.
  4762.  
  4763.       user      Looks up users using  _g_e_t_p_w_n_a_m(3).   The  --vv
  4764.                 flag  can be used to specify the name of the
  4765.                 field to return (although this  is  normally
  4766.                 used only to check the existence of a user).
  4767.  
  4768.       host      Canonifies host domain names.  Given a  host
  4769.                 name  it  calls  the name server to find the
  4770.                 canonical name for that host.
  4771.  
  4772.       sequence  The arguments on the `K' line are a list  of
  4773.                 maps;  the  resulting map searches the argu-
  4774.                 ment maps in order until it  finds  a  match
  4775.                 for  the indicated key.  For example, if the
  4776.                 key definition is:
  4777.  
  4778.                     Kmap1 ...
  4779.                     Kmap2 ...
  4780.                     Kseqmap sequence map1 map2
  4781.  
  4782.                 then a lookup against "seqmap" first does  a
  4783.                 lookup  in  map1.   If  that  is  found,  it
  4784.                 returns immediately.   Otherwise,  the  same
  4785.                 key is used for map2.
  4786.  
  4787.       switch    Much like the "sequence" map except that the
  4788.                 order of maps is determined by  the  service
  4789.                 switch.   The  argument  is  the name of the
  4790.                 service to be looked up; the values from the
  4791.                 service  switch  are appended to the service
  4792.                 name to create new map names.  For  example,
  4793.                 consider the key definition:
  4794.  
  4795.                     Kali switch aliases
  4796.  
  4797.                 together with the service switch entry:
  4798.  
  4799.                     aliases        nis files
  4800.  
  4801.                 This causes a query against the map "ali" to
  4802.                 search   maps   named   "aliases.nis"    and
  4803.                 "aliases.files" in that order.
  4804.  
  4805.       dequote   Strip  double  quotes  (")  from a name.  It
  4806.                 does not strip  backslashes,  and  will  not
  4807.                 strip  quotes  if the resulting string would
  4808.                 contain unscannable syntax (that  is,  basic
  4809.                 errors  like unbalanced angle brackets; more
  4810.                 sophisticated errors such as  unknown  hosts
  4811.                 are  not  checked).   The  intent is for use
  4812.                 when trying to accept mail from systems such
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823. SSMMMM::0088--7788          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4824.  
  4825.  
  4826.                 as  DECnet  that  routinely quote odd syntax
  4827.                 such as
  4828.  
  4829.                     "49ers::ubell"
  4830.  
  4831.                 A typical usage is probably something like:
  4832.  
  4833.                     Kdequote dequote
  4834.  
  4835.                     ...
  4836.  
  4837.                     R$-            $: $(dequote $1 $)
  4838.                     R$- $+         $: $>3 $1 $2
  4839.  
  4840.                 Care must be  taken  to  prevent  unexpected
  4841.                 results; for example,
  4842.  
  4843.                     "|someprogram < input > output"
  4844.  
  4845.                 will have quotes stripped, but the result is
  4846.                 probably not what you had in  mind.   Fortu-
  4847.                 nately these cases are rare.
  4848.  
  4849.            Most  of  these  accept  as  arguments  the  same
  4850.       optional flags and a filename (or a mapname  for  NIS;
  4851.       the filename is the root of the database path, so that
  4852.       ".db" or some  other  extension  appropriate  for  the
  4853.       database type will be added to get the actual database
  4854.       name).  Known flags are:
  4855.  
  4856.       -o        Indicates that this map is optional --  that
  4857.                 is, if it cannot be opened, no error is pro-
  4858.                 duced, and _s_e_n_d_m_a_i_l will behave  as  if  the
  4859.                 map existed but was empty.
  4860.  
  4861.       -N,  -O    If neither --NN or --OO are specified, _s_e_n_d_m_a_i_l
  4862.                 uses an adaptive algorithm to decide whether
  4863.                 or  not to look for null bytes on the end of
  4864.                 keys.  It starts by trying both; if it finds
  4865.                 any  key  with  a  null  byte it never tries
  4866.                 again without a null byte  and  vice  versa.
  4867.                 If  --NN is specified it never tries without a
  4868.                 null byte and if --OO is  specified  it  never
  4869.                 tries  with  a  null  byte.   Setting one of
  4870.                 these can speed matches but are never neces-
  4871.                 sary.   If  both  --NN  and  --OO are specified,
  4872.                 _s_e_n_d_m_a_i_l will never try any matches  at  all
  4873.                 --  that is, everything will appear to fail.
  4874.  
  4875.       -a_x       Append the string _x on  successful  matches.
  4876.                 For  example, the default _h_o_s_t map appends a
  4877.                 dot on successful matches.
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--7799
  4890.  
  4891.  
  4892.       -f        Do not fold upper to lower case before look-
  4893.                 ing up the key.
  4894.  
  4895.       -m        Match  only  (without  replacing the value).
  4896.                 If you only care about the  existence  of  a
  4897.                 key  and  not  the  value (as you might when
  4898.                 searching the  NIS  map  "hosts.byname"  for
  4899.                 example),  this  flag  prevents the map from
  4900.                 substituting the  value.   However,  The  -a
  4901.                 argument  is  still appended on a match, and
  4902.                 the default is  still  taken  if  the  match
  4903.                 fails.
  4904.  
  4905.       -k_k_e_y_c_o_l  The  key  column  name  (for NIS+) or number
  4906.                 (for text lookups).
  4907.  
  4908.       -v_v_a_l_c_o_l  The value column name (for NIS+)  or  number
  4909.                 (for text lookups).
  4910.  
  4911.       -z_d_e_l_i_m   The column delimiter (for text lookups).  It
  4912.                 can be a single character or one of the spe-
  4913.                 cial  strings  "\n" or "\t" to indicate new-
  4914.                 line  or  tab  respectively.    If   omitted
  4915.                 entirely,   the   column  separator  is  any
  4916.                 sequence of whitespace.
  4917.  
  4918.       -s_s_p_a_c_e_s_u_b
  4919.                 For the dequote map only, the  character  to
  4920.                 use to replace space characters after a suc-
  4921.                 cessful dequote.
  4922.  
  4923.            The _d_b_m map appends the strings ".pag" and ".dir"
  4924.       to  the  given  filename; the two _d_b-based maps append
  4925.       ".db".  For example, the map specification
  4926.  
  4927.           Kuucp dbm -o -N /usr/lib/uucpmap
  4928.  
  4929.       specifies an optional map named "uucp" of class "dbm";
  4930.       it  always  has null bytes at the end of every string,
  4931.       and the data is located in /usr/lib/uucpmap.{dir,pag}.
  4932.  
  4933.            The  program  _m_a_k_e_m_a_p(8) can be used to build any
  4934.       of the three database-oriented  maps.   It  takes  the
  4935.       following flags:
  4936.  
  4937.       -f        Do  not fold upper to lower case in the map.
  4938.  
  4939.       -N        Include null bytes in keys.
  4940.  
  4941.       -o        Append to an existing (old) file.
  4942.  
  4943.       -r        Allow replacement  of  existing  keys;  nor-
  4944.                 mally,  re-inserting  an  existing key is an
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955. SSMMMM::0088--8800          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  4956.  
  4957.  
  4958.                 error.
  4959.  
  4960.       -v        Print what is happening.
  4961.  
  4962.       The _s_e_n_d_m_a_i_l daemon does not have to be  restarted  to
  4963.       read the new maps as long as you change them in place;
  4964.       file locking is used so that the maps  won't  be  read
  4965.       while they are being updated.20
  4966.  
  4967.            New classes can be added in the routine sseettuuppmmaappss
  4968.       in file ccoonnff..cc.
  4969.  
  4970.    55..1100..  TThhee UUsseerr DDaattaabbaassee
  4971.  
  4972.            If you have a version of _s_e_n_d_m_a_i_l with  the  user
  4973.       database  package  compiled in, the handling of sender
  4974.       and recipient addresses is modified.
  4975.  
  4976.            The location of this database is controlled  with
  4977.       the UUsseerrDDaattaabbaasseeSSppeecc option.
  4978.  
  4979.       55..1100..11..  SSttrruuccttuurree ooff tthhee uusseerr ddaattaabbaassee
  4980.  
  4981.               The  database is a sorted (BTree-based) struc-
  4982.          ture.  User records are stored with the key:
  4983.  
  4984.              _u_s_e_r_-_n_a_m_e::_f_i_e_l_d_-_n_a_m_e
  4985.  
  4986.          The  sorted  database  format  ensures  that   user
  4987.          records  are  clustered together.  Meta-information
  4988.          is always stored with a leading colon.
  4989.  
  4990.               Field names define both the syntax and  seman-
  4991.          tics of the value.  Defined fields include:
  4992.  
  4993.          maildrop  The   delivery  address  for  this  user.
  4994.                    There may  be  multiple  values  of  this
  4995.                    record.   In  particular,  mailing  lists
  4996.                    will have one _m_a_i_l_d_r_o_p  record  for  each
  4997.                    user on the list.
  4998.  
  4999.          mailname  The outgoing mailname for this user.  For
  5000.                    each outgoing name, there  should  be  an
  5001.                    appropriate _m_a_i_l_d_r_o_p record for that name
  5002.                    to   allow   return   mail.    See   also
  5003.                    _:_d_e_f_a_u_l_t_:_m_a_i_l_n_a_m_e.
  5004.  
  5005. ____________________
  5006.    20That  is,  don't  create new maps and then use _m_v(1) to
  5007. move them into place.  Since the maps are already  open  the
  5008. new maps will never be seen.
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--8811
  5022.  
  5023.  
  5024.          mailsender
  5025.                    Changes  any mail sent to this address to
  5026.                    have the indicated envelope sender.  This
  5027.                    is  intended  for mailing lists, and will
  5028.                    normally be the name  of  an  appropriate
  5029.                    -request  address.  It is very similar to
  5030.                    the owner-_l_i_s_t syntax in the alias  file.
  5031.  
  5032.          fullname  The full name of the user.
  5033.  
  5034.          office-address
  5035.                    The office address for this user.
  5036.  
  5037.          office-phone
  5038.                    The office phone number for this user.
  5039.  
  5040.          office-fax
  5041.                    The office FAX number for this user.
  5042.  
  5043.          home-address
  5044.                    The home address for this user.
  5045.  
  5046.          home-phone
  5047.                    The home phone number for this user.
  5048.  
  5049.          home-fax  The home FAX number for this user.
  5050.  
  5051.          project   A (short) description of the project this
  5052.                    person is affiliated with.  In  the  Uni-
  5053.                    versity  this  is  often just the name of
  5054.                    their graduate advisor.
  5055.  
  5056.          plan      A pointer  to  a  file  from  which  plan
  5057.                    information can be gathered.
  5058.  
  5059.               As of this writing, only a few of these fields
  5060.          are actually being used by _s_e_n_d_m_a_i_l:  _m_a_i_l_d_r_o_p  and
  5061.          _m_a_i_l_n_a_m_e.   A  _f_i_n_g_e_r  program  that uses the other
  5062.          fields is planned.
  5063.  
  5064.       55..1100..22..  UUsseerr ddaattaabbaassee sseemmaannttiiccss
  5065.  
  5066.               When the rewriting rules submit an address  to
  5067.          the  local  mailer, the user name is passed through
  5068.          the alias file.  If no alias is found  (or  if  the
  5069.          alias  points  back  to the same address), the name
  5070.          (with ":maildrop" appended) is then used as  a  key
  5071.          in  the  user  database.  If no match occurs (or if
  5072.          the maildrop points at the same address),  forward-
  5073.          ing is tried.
  5074.  
  5075.               If  the  first token of the user name returned
  5076.          by ruleset 0 is an  "@"  sign,  the  user  database
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087. SSMMMM::0088--8822          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5088.  
  5089.  
  5090.          lookup  is  skipped.   The  intent is that the user
  5091.          database will act as a set of defaults for a  clus-
  5092.          ter  (in  our case, the Computer Science Division);
  5093.          mail sent to a specific machine should ignore these
  5094.          defaults.
  5095.  
  5096.               When  mail  is  sent,  the name of the sending
  5097.          user is looked up in the database.   If  that  user
  5098.          has  a  "mailname" record, the value of that record
  5099.          is used as their outgoing  name.   For  example,  I
  5100.          might have a record:
  5101.  
  5102.              eric:mailname  Eric.Allman@CS.Berkeley.EDU
  5103.  
  5104.          This  would  cause  my  outgoing mail to be sent as
  5105.          Eric.Allman.
  5106.  
  5107.               If a "maildrop" is found for the user, but  no
  5108.          corresponding  "mailname" record exists, the record
  5109.          ":default:mailname" is consulted.  If present, this
  5110.          is  the  name of a host to override the local host.
  5111.          For example,  in  our  case  we  would  set  it  to
  5112.          "CS.Berkeley.EDU".  The effect is that anyone known
  5113.          in the database gets their outgoing mail stamped as
  5114.          "user@CS.Berkeley.EDU",  but  people  not listed in
  5115.          the database use the local hostname.
  5116.  
  5117.       55..1100..33..  CCrreeaattiinngg tthhee ddaattaabbaassee2211
  5118.  
  5119.               The user database is built from  a  text  file
  5120.          using  the  _m_a_k_e_m_a_p utility (in the distribution in
  5121.          the makemap subdirectory).   The  text  file  is  a
  5122.          series  of  lines  corresponding to userdb records;
  5123.          each line has a key and a value separated by  white
  5124.          space.   The  key is always in the format described
  5125.          above -- for example:
  5126.  
  5127.              eric:maildrop
  5128.  
  5129.          This file is normally installed in a system  direc-
  5130.          tory;  for example, it might be called _/_e_t_c_/_u_s_e_r_d_b.
  5131.          To make the database version of the  map,  run  the
  5132.          program:
  5133.  
  5134.              makemap btree /etc/userdb.db < /etc/userdb
  5135.  
  5136.          Then  create  a  config  file  that uses this.  For
  5137. ____________________
  5138.    21These instructions are known to be incomplete.   A  fu-
  5139. ture  version  of  the  user  database  is planned including
  5140. things such as finger service -- and good documentation.
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--8833
  5154.  
  5155.  
  5156.          example, using the V8 M4 configuration, include the
  5157.          following line in your .mc file:
  5158.  
  5159.              define(`confUSERDB_SPEC', /etc/userdb.db)
  5160.  
  5161.  
  5162. 66..  OOTTHHEERR CCOONNFFIIGGUURRAATTIIOONN
  5163.  
  5164.         There  are  some  configuration  changes that can be
  5165.    made by recompiling  _s_e_n_d_m_a_i_l.   This  section  describes
  5166.    what  changes  can be made and what has to be modified to
  5167.    make them.  In most  cases  this  should  be  unnecessary
  5168.    unless you are porting _s_e_n_d_m_a_i_l to a new environment.
  5169.  
  5170.    66..11..  PPaarraammeetteerrss iinn ssrrcc//MMaakkeeffiillee
  5171.  
  5172.            These  parameters  are  intended  to describe the
  5173.       compilation environment, not site policy,  and  should
  5174.       normally be defined in src/Makefile.
  5175.  
  5176.       NDBM      If  set,  the new version of the DBM library
  5177.                 that allows multiple databases will be used.
  5178.                 If  neither  NDBM  nor NEWDB are set, a much
  5179.                 less efficient method  of  alias  lookup  is
  5180.                 used.
  5181.  
  5182.       NEWDB     If  set,  use  the new database package from
  5183.                 Berkeley (from  4.4BSD).   This  package  is
  5184.                 substantially  faster  than DBM or NDBM.  If
  5185.                 NEWDB and NDBM are both set,  _s_e_n_d_m_a_i_l  will
  5186.                 read  DBM  files,  but  will  create and use
  5187.                 NEWDB files.
  5188.  
  5189.       NIS       Include support for NIS.   If  set  together
  5190.                 with _b_o_t_h NEWDB and NDBM, _s_e_n_d_m_a_i_l will cre-
  5191.                 ate both DBM and NEWDB files if and only  if
  5192.                 an  alias file includes the substring "/yp/"
  5193.                 in the name.  This is intended for  compati-
  5194.                 bility  with  Sun Microsystems' _m_k_a_l_i_a_s pro-
  5195.                 gram used on YP masters.
  5196.  
  5197.       NISPLUS   Compile in support for NIS+.
  5198.  
  5199.       NETINFO   Compile in support for  NetInfo  (NeXT  sta-
  5200.                 tions).
  5201.  
  5202.       HESIOD    Compile in support for Hesiod.
  5203.  
  5204.       _PATH_SENDMAILCF
  5205.                 The pathname of the sendmail.cf file.
  5206.  
  5207.       _PATH_SENDMAILPID
  5208.                 The pathname of the sendmail.pid file.
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219. SSMMMM::0088--8844          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5220.  
  5221.  
  5222.            There are also several compilation flags to indi-
  5223.       cate the environment such as "_AIX3" and "_SCO_unix_".
  5224.       See  the  READ_ME  file  for the latest scoop on these
  5225.       flags.
  5226.  
  5227.    66..22..  PPaarraammeetteerrss iinn ssrrcc//ccoonnff..hh
  5228.  
  5229.            Parameters and compilation options are defined in
  5230.       conf.h.   Most  of these need not normally be tweaked;
  5231.       common parameters are all  in  sendmail.cf.   However,
  5232.       the  sizes  of  certain  primitive  vectors, etc., are
  5233.       included in this  file.   The  numbers  following  the
  5234.       parameters are their default value.
  5235.  
  5236.            This  document is not the best source of informa-
  5237.       tion  for  compilation  flags   in   conf.h   --   see
  5238.       src/READ_ME or src/conf.h itself.
  5239.  
  5240.       MAXLINE [2048]
  5241.                   The maximum line length of any input line.
  5242.                   If message lines exceed this  length  they
  5243.                   will  still  be  processed correctly; how-
  5244.                   ever,  header  lines,  configuration  file
  5245.                   lines,  alias lines, etc., must fit within
  5246.                   this limit.
  5247.  
  5248.       MAXNAME [256]
  5249.                   The maximum length of any name, such as  a
  5250.                   host or a user name.
  5251.  
  5252.       MAXPV  [40]  The  maximum  number of parameters to any
  5253.                   mailer.  This limits the number of recipi-
  5254.                   ents  that  may  be passed in one transac-
  5255.                   tion.  It can be set to any arbitrary num-
  5256.                   ber  above  about  10, since _s_e_n_d_m_a_i_l will
  5257.                   break up a delivery into  smaller  batches
  5258.                   as  needed.   A  higher  number may reduce
  5259.                   load on your system, however.
  5260.  
  5261.       MAXATOM [100]
  5262.                   The maximum number of atoms (tokens) in  a
  5263.                   single  address.  For example, the address
  5264.                   "eric@CS.Berkeley.EDU" is seven atoms.
  5265.  
  5266.       MAXMAILERS [25]
  5267.                   The maximum number of mailers that may  be
  5268.                   defined in the configuration file.
  5269.  
  5270.       MAXRWSETS [200]
  5271.                   The  maximum number of rewriting sets that
  5272.                   may be defined.  The first half  of  these
  5273.                   are  reserved  for  numeric  specification
  5274.                   (e.g., ``S92''), while the upper half  are
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--8855
  5286.  
  5287.  
  5288.                   reserved    for    auto-numbering   (e.g.,
  5289.                   ``Sfoo'').  Thus, with a value of  200  an
  5290.                   attempt  to  use ``S99'' will succeed, but
  5291.                   ``S100'' will fail.
  5292.  
  5293.       MAXPRIORITIES [25]
  5294.                   The  maximum  number  of  values  for  the
  5295.                   "Precedence:"  field  that  may be defined
  5296.                   (using the PP line in sendmail.cf).
  5297.  
  5298.       MAXUSERENVIRON [100]
  5299.                   The maximum number of items  in  the  user
  5300.                   environment  that will be passed to subor-
  5301.                   dinate mailers.
  5302.  
  5303.       MAXMXHOSTS [20]
  5304.                   The maximum number of MX records  we  will
  5305.                   accept for any single host.
  5306.  
  5307.       MAXALIASDB [12]
  5308.                   The maximum number of alias databases that
  5309.                   can be open at any time.  Note that  there
  5310.                   may also be an open file limit.
  5311.  
  5312.       MAXMAPSTACK [12]
  5313.                   The  maximum  number  of  maps that may be
  5314.                   "stacked" in a sseeqquueennccee class map.
  5315.  
  5316.       MAXMIMEARGS [20]
  5317.                   The maximum number of arguments in a  MIME
  5318.                   Content-Type: header; additional arguments
  5319.                   will be ignored.
  5320.  
  5321.       MAXMIMENESTING [20]
  5322.                   The maximum depth to which  MIME  messages
  5323.                   may  be nested (that is, nested Message or
  5324.                   Multipart documents; this does  not  limit
  5325.                   the  number of components in a single Mul-
  5326.                   tipart document).
  5327.  
  5328.       A number of other compilation  options  exist.   These
  5329.       specify  whether  or  not specific code should be com-
  5330.       piled in.  Ones marked with are 0/1 valued.
  5331.  
  5332.       NETINET     If set, support for Internet protocol net-
  5333.                   working is compiled in.  Previous versions
  5334.                   of _s_e_n_d_m_a_i_l referred to  this  as  DAEMON;
  5335.                   this old usage is now incorrect.  Defaults
  5336.                   on; turn it off in the  Makefile  if  your
  5337.                   system doesn't support the Internet proto-
  5338.                   cols.
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351. SSMMMM::0088--8866          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5352.  
  5353.  
  5354.       NETISO      If set, support for ISO protocol  network-
  5355.                   ing  is compiled in (it may be appropriate
  5356.                   to #define this in the Makefile instead of
  5357.                   conf.h).
  5358.  
  5359.       LOG         If  set, the _s_y_s_l_o_g routine in use at some
  5360.                   sites is used.   This  makes  an  informa-
  5361.                   tional  log  record  for each message pro-
  5362.                   cessed, and makes a  higher  priority  log
  5363.                   record   for   internal   system   errors.
  5364.                   SSTTRROONNGGLLYY RREECCOOMMMMEENNDDEEDD --  if  you  want  no
  5365.                   logging,  turn it off in the configuration
  5366.                   file.
  5367.  
  5368.       MATCHGECOS  Compile in the code to do  ``fuzzy  match-
  5369.                   ing''  on  the GECOS field in /etc/passwd.
  5370.                   This also  requires  that  the  MMaattcchhGGEECCOOSS
  5371.                   option be turned on.
  5372.  
  5373.       NAMED_BIND  Compile in code to use the Berkeley Inter-
  5374.                   net Name Domain (BIND) server  to  resolve
  5375.                   TCP/IP host names.
  5376.  
  5377.       NOTUNIX     If  you  are using a non-UNIX mail format,
  5378.                   you can set this flag to turn off  special
  5379.                   processing of UNIX-style "From " lines.
  5380.  
  5381.       QUEUE       This  flag should be set to compile in the
  5382.                   queueing code.  If this is not set,  mail-
  5383.                   ers must accept the mail immediately or it
  5384.                   will be returned to the sender.
  5385.  
  5386.       SMTP        If set, the code to handle user and server
  5387.                   SMTP  will  be  compiled in.  This is only
  5388.                   necessary if your machine has some  mailer
  5389.                   that speaks SMTP (this means most machines
  5390.                   everywhere).
  5391.  
  5392.       USERDB      Include  the  eexxppeerriimmeennttaall  Berkeley  user
  5393.                   information database package.  This adds a
  5394.                   new level of local name expansion  between
  5395.                   aliasing and forwarding.  It also uses the
  5396.                   NEWDB package.  This may change in  future
  5397.                   releases.
  5398.  
  5399.       The  following  options are normally turned on in per-
  5400.       operating-system clauses in conf.h.
  5401.  
  5402.       IDENTPROTO  Compile in the IDENT protocol  as  defined
  5403.                   in  RFC  1413.   This  defaults on for all
  5404.                   systems except  Ultrix,  which  apparently
  5405.                   has the interesting "feature" that when it
  5406.                   receives a "host unreachable"  message  it
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--8877
  5418.  
  5419.  
  5420.                   closes  all open connections to that host.
  5421.                   Since some  firewall  gateways  send  this
  5422.                   error code when you access an unauthorized
  5423.                   port (such as 113, used by IDENT),  Ultrix
  5424.                   cannot receive email from such hosts.
  5425.  
  5426.       SYSTEM5     Set  all  of  the  compilation  parameters
  5427.                   appropriate for System V.
  5428.  
  5429.       HASFLOCK    Use Berkeley-style fflloocckk instead of System
  5430.                   V  lloocckkff  to  do file locking.  Due to the
  5431.                   highly unusual semantics of  locks  across
  5432.                   forks in lloocckkff, this should always be used
  5433.                   if at all possible.
  5434.  
  5435.       HASINITGROUPS
  5436.                   Set this if  your  system  has  the  _i_n_i_t_-
  5437.                   _g_r_o_u_p_s_(_)  call (if you have multiple group
  5438.                   support).  This is the default if  SYSTEM5
  5439.                   is _n_o_t defined or if you are on HPUX.
  5440.  
  5441.       HASUNAME    Set  this  if you have the _u_n_a_m_e(2) system
  5442.                   call (or corresponding  library  routine).
  5443.                   Set by default if SYSTEM5 is set.
  5444.  
  5445.       HASGETDTABLESIZE
  5446.                   Set  this if you have the _g_e_t_d_t_a_b_l_e_s_i_z_e(2)
  5447.                   system call.
  5448.  
  5449.       HASWAITPID  Set this if  you  have  the  _h_a_s_w_a_i_t_p_i_d(2)
  5450.                   system call.
  5451.  
  5452.       SFS_TYPE    The mechanism that can be used to get file
  5453.                   system capacity information.   The  values
  5454.                   can  be one of SFS_USTAT (use the ustat(2)
  5455.                   syscall), SFS_4ARGS (use the four argument
  5456.                   statfs(2)  syscall),  SFS_VFS (use the two
  5457.                   argument   statfs(2)   syscall   including
  5458.                   <sys/vfs.h>), SFS_MOUNT (use the two argu-
  5459.                   ment    statfs(2)    syscall     including
  5460.                   <sys/mount.h>),  SFS_STATFS  (use  the two
  5461.                   argument   statfs(2)   syscall   including
  5462.                   <sys/statfs.h>),  SFS_STATVFS (use the two
  5463.                   argument   statfs(2)   syscall   including
  5464.                   <sys/statvfs.h>),  or  SFS_NONE (no way to
  5465.                   get this information).
  5466.  
  5467.       LA_TYPE     The  load  average  type.    Details   are
  5468.                   described below.
  5469.  
  5470.       The  are  several  built-in ways of computing the load
  5471.       average.  _S_e_n_d_m_a_i_l tries to auto-configure them  based
  5472.       on  imperfect guesses; you can select one using the _c_c
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483. SSMMMM::0088--8888          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5484.  
  5485.  
  5486.       option --DDLLAA__TTYYPPEE==_t_y_p_e, where _t_y_p_e is:
  5487.  
  5488.       LA_INT      The kernel stores the load average in  the
  5489.                   kernel  as an array of long integers.  The
  5490.                   actual  values  are  scaled  by  a  factor
  5491.                   FSCALE (default 256).
  5492.  
  5493.       LA_SHORT    The  kernel stores the load average in the
  5494.                   kernel as an array of short integers.  The
  5495.                   actual  values  are  scaled  by  a  factor
  5496.                   FSCALE (default 256).
  5497.  
  5498.       LA_FLOAT    The kernel stores the load average in  the
  5499.                   kernel  as  an  array  of double precision
  5500.                   floats.
  5501.  
  5502.       LA_MACH     Use MACH-style load averages.
  5503.  
  5504.       LA_SUBR     Call the _g_e_t_l_o_a_d_a_v_g  routine  to  get  the
  5505.                   load average as an array of doubles.
  5506.  
  5507.       LA_ZERO     Always  return  zero  as the load average.
  5508.                   This is the fallback case.
  5509.  
  5510.       If type LA_INT, LA_SHORT, or  LA_FLOAT  is  specified,
  5511.       you  may  also need to specify _PATH_UNIX (the path to
  5512.       your system binary) and LA_AVENRUN (the  name  of  the
  5513.       variable  containing  the  load average in the kernel;
  5514.       usually "_avenrun" or "avenrun").
  5515.  
  5516.    66..33..  CCoonnffiigguurraattiioonn iinn ssrrcc//ccoonnff..cc
  5517.  
  5518.            The following changes can be made in conf.c.
  5519.  
  5520.       66..33..11..  BBuuiilltt--iinn HHeeaaddeerr SSeemmaannttiiccss
  5521.  
  5522.               Not all header semantics are  defined  in  the
  5523.          configuration  file.  Header lines that should only
  5524.          be included by certain mailers (as  well  as  other
  5525.          more  obscure  semantics)  must be specified in the
  5526.          _H_d_r_I_n_f_o table in _c_o_n_f_._c.  This table  contains  the
  5527.          header name (which should be in all lower case) and
  5528.          a set of header control  flags  (described  below),
  5529.          The flags are:
  5530.  
  5531.          H_ACHECK    Normally  when the check is made to see
  5532.                      if a header line is compatible  with  a
  5533.                      mailer,  _s_e_n_d_m_a_i_l  will  not  delete an
  5534.                      existing line.  If this  flag  is  set,
  5535.                      _s_e_n_d_m_a_i_l   will  delete  even  existing
  5536.                      header lines.  That is, if this bit  is
  5537.                      set  and  the mailer does not have flag
  5538.                      bits  set  that  intersect   with   the
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--8899
  5550.  
  5551.  
  5552.                      required  mailer  flags  in  the header
  5553.                      definition in sendmail.cf,  the  header
  5554.                      line is _a_l_w_a_y_s deleted.
  5555.  
  5556.          H_EOH       If  this  header field is set, treat it
  5557.                      like a blank line, i.e., it will signal
  5558.                      the end of the header and the beginning
  5559.                      of the message text.
  5560.  
  5561.          H_FORCE     Add  this  header  entry  even  if  one
  5562.                      existed  in  the  message before.  If a
  5563.                      header entry does  not  have  this  bit
  5564.                      set,  _s_e_n_d_m_a_i_l  will  not  add  another
  5565.                      header line if a header  line  of  this
  5566.                      name  already existed.  This would nor-
  5567.                      mally be used to stamp the  message  by
  5568.                      everyone who handled it.
  5569.  
  5570.          H_TRACE     If  set,  this  is  a timestamp (trace)
  5571.                      field.  If the number of  trace  fields
  5572.                      in  a  message  exceeds a preset amount
  5573.                      the message is returned on the  assump-
  5574.                      tion that it has an aliasing loop.
  5575.  
  5576.          H_RCPT      If  set,  this field contains recipient
  5577.                      addresses.  This is used by the --tt flag
  5578.                      to  determine who to send to when it is
  5579.                      collecting recipients from the message.
  5580.  
  5581.          H_FROM      This  flag  indicates  that  this field
  5582.                      specifies a sender.  The order of these
  5583.                      fields  in  the _H_d_r_I_n_f_o table specifies
  5584.                      _s_e_n_d_m_a_i_l's preference for  which  field
  5585.                      to return error messages to.
  5586.  
  5587.          H_ERRORSTO  Addresses in this header should receive
  5588.                      error messages.
  5589.  
  5590.          H_CTE       This  header  is  a   Content-Transfer-
  5591.                      Encoding header.
  5592.  
  5593.          H_CTYPE     This header is a Content-Type header.
  5594.  
  5595.          H_STRIPVAL  Strip  the  value  from the header (for
  5596.                      Bcc:).
  5597.  
  5598.          Let's look at a sample _H_d_r_I_n_f_o specification:
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615. SSMMMM::0088--9900          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5616.  
  5617.  
  5618.              struct hdrinfo                    HdrInfo[] =
  5619.              {
  5620.                       /* originator fields, most to least significant  */
  5621.                  "resent-sender",              H_FROM,
  5622.                  "resent-from",                H_FROM,
  5623.                  "sender",                     H_FROM,
  5624.                  "from",                       H_FROM,
  5625.                  "full-name",                  H_ACHECK,
  5626.                  "errors-to",                  H_FROM|H_ERRORSTO,
  5627.                       /* destination fields */
  5628.                  "to",                         H_RCPT,
  5629.                  "resent-to",                  H_RCPT,
  5630.                  "cc",                         H_RCPT,
  5631.                  "bcc",                        H_RCPT|H_STRIPVAL,
  5632.                       /* message identification and control */
  5633.                  "message",                    H_EOH,
  5634.                  "text",                       H_EOH,
  5635.                       /* trace fields */
  5636.                  "received",                   H_TRACE|H_FORCE,
  5637.                       /* miscellaneous fields */
  5638.                  "content-transfer-encoding",  H_CTE,
  5639.                  "content-type",               H_CTYPE,
  5640.  
  5641.                  NULL,                         0,
  5642.              };
  5643.  
  5644.          This structure indicates that the  "To:",  "Resent-
  5645.          To:",   and  "Cc:"  fields  all  specify  recipient
  5646.          addresses.  Any "Full-Name:" field will be  deleted
  5647.          unless  the  required mailer flag (indicated in the
  5648.          configuration file) is specified.   The  "Message:"
  5649.          and "Text:" fields will terminate the header; these
  5650.          are used by random dissenters  around  the  network
  5651.          world.  The "Received:" field will always be added,
  5652.          and can be used to trace messages.
  5653.  
  5654.               There are a number of important  points  here.
  5655.          First,  header  fields  are not added automatically
  5656.          just because they are  in  the  _H_d_r_I_n_f_o  structure;
  5657.          they must be specified in the configuration file in
  5658.          order to be  added  to  the  message.   Any  header
  5659.          fields  mentioned in the configuration file but not
  5660.          mentioned in the  _H_d_r_I_n_f_o  structure  have  default
  5661.          processing  performed;  that  is,  they  are  added
  5662.          unless they were in the message  already.   Second,
  5663.          the  _H_d_r_I_n_f_o  structure only specifies cliched pro-
  5664.          cessing; certain headers are processed specially by
  5665.          ad  hoc  code regardless of the status specified in
  5666.          _H_d_r_I_n_f_o.  For example, the  "Sender:"  and  "From:"
  5667.          fields are always scanned on ARPANET mail to deter-
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--9911
  5682.  
  5683.  
  5684.          mine the sender22; this  is  used  to  perform  the
  5685.          "return  to  sender"  function.   The  "From:"  and
  5686.          "Full-Name:" fields are used to determine the  full
  5687.          name  of  the sender if possible; this is stored in
  5688.          the macro $$xx and used in a number of ways.
  5689.  
  5690.       66..33..22..  RReessttrriiccttiinngg UUssee ooff EEmmaaiill
  5691.  
  5692.               If it is necessary to restrict mail through  a
  5693.          relay,  the  _c_h_e_c_k_c_o_m_p_a_t  routine  can be modified.
  5694.          This routine is called for every recipient address.
  5695.          It  returns an exit status indicating the status of
  5696.          the message.  The status EX_OK accepts the address,
  5697.          EX_TEMPFAIL queues the message for a later try, and
  5698.          other values (commonly EX_UNAVAILABLE)  reject  the
  5699.          message.  It is up to _c_h_e_c_k_c_o_m_p_a_t to print an error
  5700.          message (using _u_s_r_e_r_r) if the message is  rejected.
  5701.          For example, _c_h_e_c_k_c_o_m_p_a_t could read:
  5702.  
  5703.              int
  5704.              checkcompat(to, e)
  5705.                  register ADDRESS *to;
  5706.                  register ENVELOPE *e;
  5707.              {
  5708.                  register STAB *s;
  5709.  
  5710.                  s = stab("private", ST_MAILER, ST_FIND);
  5711.                  if (s != NULL && e->e_from.q_mailer != LocalMailer &&
  5712.                      to->q_mailer == s->s_mailer)
  5713.                  {
  5714.                      usrerr("No private net mail allowed through this machine");
  5715.                      return (EX_UNAVAILABLE);
  5716.                  }
  5717.                  if (MsgSize > 50000 && bitnset(M_LOCALMAILER, to->q_mailer))
  5718.                  {
  5719.                      usrerr("Message too large for non-local delivery");
  5720.                      e->e_flags |= EF_NORETURN;
  5721.                      return (EX_UNAVAILABLE);
  5722.                  }
  5723.                  return (EX_OK);
  5724.              }
  5725.  
  5726.          This would reject messages greater than 50000 bytes
  5727.          unless they were local.  The _E_F___N_O_R_E_T_U_R_N  flag  can
  5728.          be  set in _e_-_>_e___f_l_a_g_s to suppress the return of the
  5729.          actual body of the message  in  the  error  return.
  5730.          The  actual use of this routine is highly dependent
  5731.          on the implementation, and use should be limited.
  5732. ____________________
  5733.    22Actually, this is no longer true in SMTP; this informa-
  5734. tion is contained in the envelope.  The older ARPANET proto-
  5735. cols did not completely distinguish envelope from header.
  5736.  
  5737.  
  5738.  
  5739.  
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747. SSMMMM::0088--9922          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5748.  
  5749.  
  5750.       66..33..33..  LLooaadd AAvveerraaggee CCoommppuuttaattiioonn
  5751.  
  5752.               The routine _g_e_t_l_a should return an  approxima-
  5753.          tion of the current system load average as an inte-
  5754.          ger.  There are several versions included on compi-
  5755.          lation flags as described above.
  5756.  
  5757.       66..33..44..  NNeeww DDaattaabbaassee MMaapp CCllaasssseess
  5758.  
  5759.               New  key maps can be added by creating a class
  5760.          initialization  function  and  a  lookup  function.
  5761.          These are then added to the routine _s_e_t_u_p_m_a_p_s_.
  5762.  
  5763.               The initialization function is called as
  5764.  
  5765.              _x_x_x_map_init(MAP *map, char *mapname, char *args)
  5766.  
  5767.          The _m_a_p is an internal data structure.  The _m_a_p_n_a_m_e
  5768.          is the name of the map (used for  error  messages).
  5769.          The _a_r_g_s is a pointer to the rest of the configura-
  5770.          tion  file  line;  flags  and  filenames   can   be
  5771.          extracted from this line.  The initialization func-
  5772.          tion must return TRUE if it successfully opened the
  5773.          map, FALSE otherwise.
  5774.  
  5775.               The lookup function is called as
  5776.  
  5777.              _x_x_x_map_lookup(MAP *map, char buf[], int bufsize, char **av, int *statp)
  5778.  
  5779.          The _m_a_p defines the map internally.  The parameters
  5780.          _b_u_f and _b_u_f_s_i_z_e have the input key.   This  may  be
  5781.          (and  often  is)  used  destructively.  The _a_v is a
  5782.          list of arguments passed in from the rewrite  line.
  5783.          The  lookup function should return a pointer to the
  5784.          new value.  IF the map lookup fails, _*_s_t_a_t_p  should
  5785.          be  set  to  an exit status code; in particular, it
  5786.          should be set to EX_TEMPFAIL if recovery is  to  be
  5787.          attempted by the higher level code.
  5788.  
  5789.       66..33..55..  QQuueeuueeiinngg FFuunnccttiioonn
  5790.  
  5791.               The routine _s_h_o_u_l_d_q_u_e_u_e is called to decide if
  5792.          a message should be  queued  or  processed  immedi-
  5793.          ately.   Typically this compares the message prior-
  5794.          ity to the current load average.  The default defi-
  5795.          nition is:
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.  
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--9933
  5814.  
  5815.  
  5816.              bool
  5817.              shouldqueue(pri, ctime)
  5818.                  long pri;
  5819.                  time_t ctime;
  5820.              {
  5821.                  if (CurrentLA < QueueLA)
  5822.                      return (FALSE);
  5823.                  return (pri > (QueueFactor / (CurrentLA - QueueLA + 1)));
  5824.              }
  5825.  
  5826.          If  the  current load average (global variable _C_u_r_-
  5827.          _r_e_n_t_L_A,  which  is  set  before  this  function  is
  5828.          called) is less than the low threshold load average
  5829.          (option xx, variable _Q_u_e_u_e_L_A),  _s_h_o_u_l_d_q_u_e_u_e  returns
  5830.          FALSE  immediately  (that is, it should _n_o_t queue).
  5831.          If  the  current  load  average  exceeds  the  high
  5832.          threshold   load   average   (option   XX,  variable
  5833.          _R_e_f_u_s_e_L_A), _s_h_o_u_l_d_q_u_e_u_e  returns  TRUE  immediately.
  5834.          Otherwise,  it  computes  the function based on the
  5835.          message  priority,  the  queue  factor  (option  qq,
  5836.          global  variable  _Q_u_e_u_e_F_a_c_t_o_r), and the current and
  5837.          threshold load averages.
  5838.  
  5839.               An implementation wishing to take  the  actual
  5840.          age  of  the  message into account can also use the
  5841.          _c_t_i_m_e parameter, which is the time that the message
  5842.          was first submitted to _s_e_n_d_m_a_i_l.  Note that the _p_r_i
  5843.          parameter is already  weighted  by  the  number  of
  5844.          times  the  message  has  been tried (although this
  5845.          tends to lower the priority  of  the  message  with
  5846.          time);  the  expectation is that the _c_t_i_m_e would be
  5847.          used as an "escape clause" to ensure that  messages
  5848.          are eventually processed.
  5849.  
  5850.       66..33..66..  RReeffuussiinngg IInnccoommiinngg SSMMTTPP CCoonnnneeccttiioonnss
  5851.  
  5852.               The function _r_e_f_u_s_e_c_o_n_n_e_c_t_i_o_n_s returns TRUE if
  5853.          incoming SMTP connections should be  refused.   The
  5854.          current  implementation is based exclusively on the
  5855.          current load average and the  refuse  load  average
  5856.          option (option XX, global variable _R_e_f_u_s_e_L_A):
  5857.  
  5858.              bool
  5859.              refuseconnections()
  5860.              {
  5861.                  return (CurrentLA >= RefuseLA);
  5862.              }
  5863.  
  5864.          A  more  clever  implementation  could look at more
  5865.          system resources.
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879. SSMMMM::0088--9944          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  5880.  
  5881.  
  5882.       66..33..77..  LLooaadd AAvveerraaggee CCoommppuuttaattiioonn
  5883.  
  5884.               The routine _g_e_t_l_a  returns  the  current  load
  5885.          average  (as  a rounded integer).  The distribution
  5886.          includes several possible implementations.  If  you
  5887.          are  porting  to  a new environment you may need to
  5888.          add some new tweaks.23
  5889.  
  5890.    66..44..  CCoonnffiigguurraattiioonn iinn ssrrcc//ddaaeemmoonn..cc
  5891.  
  5892.            The  file  _s_r_c_/_d_a_e_m_o_n_._c contains a number of rou-
  5893.       tines that are dependent on the local networking envi-
  5894.       ronment.   The  version  supplied assumes you have BSD
  5895.       style sockets.
  5896.  
  5897.            In previous releases,  we  recommended  that  you
  5898.       modify the routine _m_a_p_h_o_s_t_n_a_m_e if you wanted to gener-
  5899.       alize $$[[ ... $$]] lookups.  We now  recommend  that  you
  5900.       create a new keyed map instead.
  5901.  
  5902. 77..  CCHHAANNGGEESS IINN VVEERRSSIIOONN 88
  5903.  
  5904.         The following summarizes changes since the last com-
  5905.    monly  available  version  of  _s_e_n_d_m_a_i_l  (5.67).   For  a
  5906.    detailed list, consult the file RELEASE_NOTES in the root
  5907.    directory of the _s_e_n_d_m_a_i_l distribution.
  5908.  
  5909.    77..11..  CCoonnnneeccttiioonn CCaacchhiinngg
  5910.  
  5911.            Instead of closing SMTP connections  immediately,
  5912.       those  connections are cached for possible future use.
  5913.       The advent of MX records made this effective for mail-
  5914.       ing   lists;   in  addition,  substantial  performance
  5915.       improvements can be expected for queue processing.
  5916.  
  5917.    77..22..  MMXX PPiiggggyybbaacckkiinngg
  5918.  
  5919.            If two hosts with different  names  in  a  single
  5920.       message  happen to have the same set of MX hosts, they
  5921.       can be  sent  in  the  same  transaction.   Version  8
  5922.       notices this and tries to batch the messages.
  5923.  
  5924.    77..33..  RRFFCC 11112233 CCoommpplliiaannccee
  5925.  
  5926.            A  number of changes have been made to make _s_e_n_d_-
  5927.       _m_a_i_l "conditionally compliant" (that is, _s_e_n_d_m_a_i_l sat-
  5928.       isfies  all of the "MUST" clauses and most but not all
  5929.       of the "SHOULD" clauses in RFC 1123).
  5930. ____________________
  5931.    23If   you   do,   please   send   updates    to    send-
  5932. mail@CS.Berkeley.EDU.
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--9955
  5946.  
  5947.  
  5948.            The major areas of change are  (numbers  are  RFC
  5949.       1123 section numbers):
  5950.  
  5951.       5.2.7    Response to RCPT command is fast.
  5952.  
  5953.       5.2.8    Numeric  IP addresses are logged in Received:
  5954.                lines.
  5955.  
  5956.       5.2.17   Self domain literal is properly handled.
  5957.  
  5958.       5.3.2    Better control over individual timeouts.
  5959.  
  5960.       5.3.3    Error messages are sent as "From:<>".
  5961.  
  5962.       5.3.3    Error messages are never sent to "<>".
  5963.  
  5964.       5.3.3    Route-addrs are pruned.
  5965.  
  5966.       The areas in which _s_e_n_d_m_a_i_l  is  not  "unconditionally
  5967.       compliant" are:
  5968.  
  5969.       5.2.6    _S_e_n_d_m_a_i_l does do header munging.
  5970.  
  5971.       5.2.10   _S_e_n_d_m_a_i_l  doesn't  always  use the exact SMTP
  5972.                message text as listed in RFC 821.
  5973.  
  5974.       5.3.1.1  _S_e_n_d_m_a_i_l doesn't guarantee only  one  connect
  5975.                for each host in queue runs.
  5976.  
  5977.       5.3.1.1  _S_e_n_d_m_a_i_l doesn't always provide adequate con-
  5978.                currency limits.
  5979.  
  5980.    77..44..  EExxtteennddeedd SSMMTTPP SSuuppppoorrtt
  5981.  
  5982.            Version 8 includes  both  sending  and  receiving
  5983.       support  for  Extended  SMTP support as defined by RFC
  5984.       1651 (basic) and RFC 1653 (SIZE); and limited  support
  5985.       for RFC 1652 (BODY).
  5986.  
  5987.    77..55..  EEiigghhtt--BBiitt CClleeaann
  5988.  
  5989.            Previous  versions  of _s_e_n_d_m_a_i_l used the 0200 bit
  5990.       for quoting.  This version avoids that use.   However,
  5991.       for compatibility with RFC 822, you can set option `7'
  5992.       to get seven bit stripping.
  5993.  
  5994.            Individual mailers can still  produce  seven  bit
  5995.       output using the `7' mailer flag.
  5996.  
  5997.    77..66..  UUsseerr DDaattaabbaassee
  5998.  
  5999.            The  user  database  is  an  as-yet  experimental
  6000.       attempt to provide unified  large-site  name  support.
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011. SSMMMM::0088--9966          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6012.  
  6013.  
  6014.       We  are installing it at Berkeley; future versions may
  6015.       show significant modifications.
  6016.  
  6017.    77..77..  IImmpprroovveedd BBIINNDD SSuuppppoorrtt
  6018.  
  6019.            The BIND support, particularly  for  MX  records,
  6020.       had  a  number  of annoying "features" which have been
  6021.       removed in this release.  In  particular,  these  more
  6022.       tightly  bind  (pun intended) the name server to _s_e_n_d_-
  6023.       _m_a_i_l, so that the name  server  resolution  rules  are
  6024.       incorporated directly into sseennddmmaaiill.
  6025.  
  6026.    77..88..  KKeeyyeedd FFiilleess
  6027.  
  6028.            Generalized keyed files is an idea taken directly
  6029.       from IDA _s_e_n_d_m_a_i_l (albeit with a completely  different
  6030.       implementation).  They can be useful on large sites.
  6031.  
  6032.            Version 8 also understands YP.
  6033.  
  6034.    77..99..  MMuullttii--WWoorrdd CCllaasssseess
  6035.  
  6036.            Classes can now be multiple words.  For example,
  6037.  
  6038.           CShofmann.CS.Berkeley.EDU
  6039.  
  6040.       allows   you   to   match   the  entire  string  "hof-
  6041.       mann.CS.Berkeley.EDU"  using  the   single   construct
  6042.       "$=S".
  6043.  
  6044.    77..1100..  DDeeffeerrrreedd MMaaccrroo EExxppaannssiioonn
  6045.  
  6046.            The $$&&_x construct has been adopted from IDA.
  6047.  
  6048.    77..1111..  IIDDEENNTT PPrroottooccooll SSuuppppoorrtt
  6049.  
  6050.            The IDENT protocol as defined in RFC 1413 is sup-
  6051.       ported.
  6052.  
  6053.    77..1122..  PPaarrssiinngg BBuugg FFiixxeess
  6054.  
  6055.            A number of small bugs having to do  with  things
  6056.       like  backslash-escaped quotes inside of comments have
  6057.       been fixed.
  6058.  
  6059.    77..1133..  SSeeppaarraattee EEnnvveellooppee//HHeeaaddeerr PPrroocceessssiinngg
  6060.  
  6061.            Since the From: line is passed in separately from
  6062.       the  envelope  sender, these have both been made visi-
  6063.       ble; the $$gg macro is set to the envelope sender during
  6064.       processing  of  mailer argument vectors and the header
  6065.       sender during processing of headers.
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--9977
  6078.  
  6079.  
  6080.            It is also  possible  to  specify  separate  per-
  6081.       mailer  envelope  and  header processing.  The SSender-
  6082.       RWSet and RRecipientRWset arguments for mailers can  be
  6083.       specified as _e_n_v_e_l_o_p_e_/_h_e_a_d_e_r to give different rewrit-
  6084.       ings for envelope versus header addresses.
  6085.  
  6086.    77..1144..  OOwwnneerr--LLiisstt PPrrooppaaggaatteess ttoo EEnnvveellooppee
  6087.  
  6088.            When an alias has an associated owner-list  name,
  6089.       that  alias  is  used  to  change  the envelope sender
  6090.       address.  This will  cause  downstream  errors  to  be
  6091.       returned to that owner.
  6092.  
  6093.    77..1155..  DDyynnaammiicc HHeeaaddeerr AAllllooccaattiioonn
  6094.  
  6095.            The  fixed  size  limit  on header lines has been
  6096.       eliminated.
  6097.  
  6098.    77..1166..  NNeeww CCoommmmaanndd LLiinnee FFllaaggss
  6099.  
  6100.            The --BB flag has been added to pass in  body  type
  6101.       information.
  6102.  
  6103.            The  --pp  flag  has been added to pass in protocol
  6104.       information.
  6105.  
  6106.            The --XX flag has been added to  allow  logging  of
  6107.       all protocol in and out of _s_e_n_d_m_a_i_l for debugging.
  6108.  
  6109.            The --OO flag simplies setting long-form options.
  6110.  
  6111.    77..1177..  EEnnhhaanncceedd CCoommmmaanndd LLiinnee FFllaaggss
  6112.  
  6113.            The  --qq  flag can limit limit a queue run to spe-
  6114.       cific recipients, senders, or queue ids using  --qqRR_s_u_b_-
  6115.       _s_t_r_i_n_g,, --qqSS_s_u_b_s_t_r_i_n_g,, oorr --qqII_s_u_b_s_t_r_i_n_g rreessppeeccttiivveellyy..
  6116.  
  6117.    77..1188..  NNeeww aanndd OOlldd CCoonnffiigguurraattiioonn LLiinnee TTyyppeess
  6118.  
  6119.            The  KK  line  has  been added to declare database
  6120.       maps.
  6121.  
  6122.            The VV line has been added to declare the configu-
  6123.       ration version level.
  6124.  
  6125.            The  MM line has a "D=" field that lets you change
  6126.       into a temporary directory while that mailer  is  run-
  6127.       ning.   It  also  has a "U=" field to allow you to set
  6128.       the user and group id to  be  used  when  running  the
  6129.       mailer.
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143. SSMMMM::0088--9988          SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6144.  
  6145.  
  6146.    77..1199..  NNeeww OOppttiioonnss
  6147.  
  6148.            Several new options have been added, many to sup-
  6149.       port new features, others to  allow  tuning  that  was
  6150.       previously  available  only  by recompiling.  They are
  6151.       described in detail in Section 5.1.5.  Briefly,
  6152.  
  6153.       b    Insist on a minimum number of disk blocks.
  6154.  
  6155.       C    Set checkpoint interval.
  6156.  
  6157.       E    Default error message.
  6158.  
  6159.       G    Enable GECOS matching.
  6160.  
  6161.       h    Maximum hop count.
  6162.  
  6163.       j    Send errors in MIME-encapsulated format.
  6164.  
  6165.       J    Forward file path.
  6166.  
  6167.       k    Connection cache size
  6168.  
  6169.       K    Connection cache lifetime.
  6170.  
  6171.       l    Enable Errors-To: header.  These headers  violate
  6172.            RFC 1123; this option is included to provide back
  6173.            compatibility with old versions of _s_e_n_d_m_a_i_l.
  6174.  
  6175.       O    Set incoming SMTP  daemon  options,  such  as  an
  6176.            alternate SMTP port.
  6177.  
  6178.       p    Privacy options.
  6179.  
  6180.       R    Don't prune route-addrs.
  6181.  
  6182.       U    User database spec.
  6183.  
  6184.       V    Fallback "MX" host.
  6185.  
  6186.       w    "Best MX" handling technique.
  6187.  
  6188.       7    Do not run eight bit clean.
  6189.  
  6190.       8    Eight bit data handling mode.
  6191.  
  6192.    77..2200..  EExxtteennddeedd OOppttiioonnss
  6193.  
  6194.            The  rr (read timeout), II (use BIND), and TT (queue
  6195.       timeout) options have been extended to  pass  in  more
  6196.       information.
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee          SSMMMM::0088--9999
  6210.  
  6211.  
  6212.    77..2211..  NNeeww MMaaiilleerr FFllaaggss
  6213.  
  6214.            Several new mailer flags have been added.
  6215.  
  6216.       a    Try  to use ESMTP when creating a connection.  If
  6217.            this is not set, _s_e_n_d_m_a_i_l will still try  if  the
  6218.            other  end hints that it knows about ESMTP in its
  6219.            greeting message; this flag says to try  even  if
  6220.            it  doesn't  hint.   If the EHLO (extended hello)
  6221.            command fails, _s_e_n_d_m_a_i_l falls back to old SMTP.
  6222.  
  6223.       A    Try the user part of addresses for this mailer as
  6224.            aliases.
  6225.  
  6226.       b    Ensure  that  there is a blank line at the end of
  6227.            all messages.
  6228.  
  6229.       c    Strip all comments from  addresses;  this  should
  6230.            only  be  used as a last resort when dealing with
  6231.            cranky mailers.
  6232.  
  6233.       g    Never use the null sender as the envelope sender,
  6234.            even  when  running SMTP.  Although this violates
  6235.            RFC 1123, it may be necessary when you must  deal
  6236.            with some obnoxious old hosts.
  6237.  
  6238.       k    Turn off the loopback check in the HELO protocol;
  6239.            doing this may cause mailer loops.
  6240.  
  6241.       o    Always run the mailer as  the  recipient  of  the
  6242.            message.
  6243.  
  6244.       w    This user should have a passwd file entry.
  6245.  
  6246.       5    Try ruleset 5 if no local aliases.
  6247.  
  6248.       7    Strip all output to 7 bits.
  6249.  
  6250.       :    Check for :include: files.
  6251.  
  6252.       |    Check for |program addresses.
  6253.  
  6254.       /    Check for /file addresses.
  6255.  
  6256.       @    Check this user against the user database.
  6257.  
  6258.    77..2222..  LLoonngg OOppttiioonn NNaammeess
  6259.  
  6260.            All  options  can  be specified using long names,
  6261.       and some new options can only be specified  with  long
  6262.       names.
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275. SSMMMM::0088--110000         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6276.  
  6277.  
  6278.    77..2233..  NNeeww PPrree--DDeeffiinneedd MMaaccrrooss
  6279.  
  6280.            The following macros are pre-defined:
  6281.  
  6282.       $k   The UUCP node name, nominally from _u_n_a_m_e(2) call.
  6283.  
  6284.       $m   The domain part of our full hostname.
  6285.  
  6286.       $_   The RFC 1413-provided sender address.
  6287.  
  6288.    77..2244..  NNeeww LLHHSS TTookkeenn
  6289.  
  6290.            Version 8 allows $$@@ on the Left Hand Side  of  an
  6291.       "R" line to match zero tokens.  This is intended to be
  6292.       used to match the null input.
  6293.  
  6294.    77..2255..  BBiiggggeerr DDeeffaauullttss
  6295.  
  6296.            Version 8 allows up to 100  rulesets  instead  of
  6297.       30.   It  is recommended that rulesets 0-9 be reserved
  6298.       for _s_e_n_d_m_a_i_l's dedicated use in future releases.
  6299.  
  6300.            The total number of MX records that can  be  used
  6301.       has been raised to 20.
  6302.  
  6303.            The number of queued messages that can be handled
  6304.       at one time has been raised from 600 to 1000.
  6305.  
  6306.    77..2266..  DDiiffffeerreenntt DDeeffaauulltt TTuunniinngg PPaarraammeetteerrss
  6307.  
  6308.            Version 8 has changed the default parameters  for
  6309.       tuning  queue  costs  to make the number of recipients
  6310.       more important than the size of the message (for small
  6311.       messages).   This  is  reasonable if you are connected
  6312.       with reasonably fast links.
  6313.  
  6314.    77..2277..  AAuuttoo--QQuuoottiinngg iinn AAddddrreesssseess
  6315.  
  6316.            Previously, the "Full Name <email address>"  syn-
  6317.       tax  would generate incorrect protocol output if "Full
  6318.       Name" had special characters such as dot.   This  ver-
  6319.       sion puts quotes around such names.
  6320.  
  6321.    77..2288..  SSyymmbboolliicc NNaammeess OOnn EErrrroorr MMaaiilleerr
  6322.  
  6323.            Several  names  have been built in to the $@ por-
  6324.       tion of the $#error mailer.
  6325.  
  6326.    77..2299..  SSMMTTPP VVRRFFYY DDooeessnn''tt EExxppaanndd
  6327.  
  6328.            Previous versions of _s_e_n_d_m_a_i_l  treated  VRFY  and
  6329.       EXPN  the  same.  In this version, VRFY doesn't expand
  6330.       aliases or follow .forward files.  EXPN still does.
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee         SSMMMM::0088--110011
  6342.  
  6343.  
  6344.            As an optimization, if you run with your  default
  6345.       delivery   mode   being   queue-only   or  deliver-in-
  6346.       background, the  RCPT  command  will  also  not  chase
  6347.       aliases  and  .forward files.  It will chase them when
  6348.       it processes the queue.
  6349.  
  6350.    77..3300..  [[IIPPCC]] MMaaiilleerrss AAllllooww MMuullttiippllee HHoossttss
  6351.  
  6352.            When an address resolves to  a  mailer  that  has
  6353.       "[IPC]"  as its "Path", the $@ part (host name) can be
  6354.       a colon-separated list of hosts instead  of  a  single
  6355.       hostname.   This  asks _s_e_n_d_m_a_i_l to search the list for
  6356.       the first entry that is available exactly as though it
  6357.       were  an  MX  record.  The intent is to route internal
  6358.       traffic through internal networks  without  publishing
  6359.       an  MX  record to the net.  MX expansion is still done
  6360.       on the individual items.
  6361.  
  6362.    77..3311..  AAlliiaasseess EExxtteennddeedd
  6363.  
  6364.            The implementation has  been  merged  with  maps.
  6365.       Among other things, this supports NIS-based aliases.
  6366.  
  6367.    77..3322..  PPoorrttaabbiilliittyy aanndd SSeeccuurriittyy EEnnhhaanncceemmeennttss
  6368.  
  6369.            A  number  of  internal changes have been made to
  6370.       enhance portability.
  6371.  
  6372.            Several fixes have  been  made  to  increase  the
  6373.       paranoia factor.
  6374.  
  6375.    77..3333..  MMiisscceellllaanneeoouuss CChhaannggeess
  6376.  
  6377.            _S_e_n_d_m_a_i_l writes a _/_e_t_c_/_s_e_n_d_m_a_i_l_._p_i_d file with the
  6378.       current process id of the SMTP daemon.
  6379.  
  6380.            Two people using the same program in their  .for-
  6381.       ward  file  are considered different so that duplicate
  6382.       elimination doesn't delete one of them.
  6383.  
  6384.            The _m_a_i_l_s_t_a_t_s program  prints  mailer  names  and
  6385.       gets   the  location  of  the  _s_e_n_d_m_a_i_l_._s_t  file  from
  6386.       _/_e_t_c_/_s_e_n_d_m_a_i_l_._c_f.
  6387.  
  6388.            Many minor bugs have been fixed, such as handling
  6389.       of backslashes inside of quotes.
  6390.  
  6391.            A  hook  (ruleset  5)  has  been  added  to allow
  6392.       rewriting of local addresses after aliasing.
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407. SSMMMM::0088--110022         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6408.  
  6409.  
  6410. 88..  AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS
  6411.  
  6412.         I've worked on _s_e_n_d_m_a_i_l for  many  years,  and  many
  6413.    employers  have  been remarkably patient about letting me
  6414.    work on a large project that was not part of my  official
  6415.    job.   This includes time on the INGRES Project at Berke-
  6416.    ley, at Britton Lee, and again on the Mammoth Project  at
  6417.    Berkeley.
  6418.  
  6419.         Much  of  the  second wave of improvements should be
  6420.    credited to Bryan Costales of  ICSI.   As  he  passed  me
  6421.    drafts  of  his  book on _s_e_n_d_m_a_i_l I was inspired to start
  6422.    working on things again.  Bryan  was  also  available  to
  6423.    bounce ideas off of.
  6424.  
  6425.         Many,  many  people  contributed  chunks of code and
  6426.    ideas to _s_e_n_d_m_a_i_l.  It has proven to be a  group  network
  6427.    effort.   Version  8  in  particular was a group project.
  6428.    The following people made notable contributions:
  6429.  
  6430.        John Beck, Hewlett-Packard
  6431.        Keith Bostic, CSRG, University of California, Berkeley
  6432.        Andrew Cheng, Sun Microsystems
  6433.        Michael J. Corrigan, University of California, San Diego
  6434.        Bryan Costales, International Computer Science Institute
  6435.        Pa..r (Pell) Emanuelsson
  6436.        Craig Everhart, Transarc Corporation
  6437.        Tom Ivar Helbekkmo, Norwegian School of Economics
  6438.        Allan E. Johannesen, WPI
  6439.        Jonathan Kamens, OpenVision Technologies, Inc.
  6440.        Takahiro Kanbe, Fuji Xerox Information Systems Co., Ltd.
  6441.        Brian Kantor, University of California, San Diego
  6442.        Murray S. Kucherawy, HookUp Communication Corp.
  6443.        Bruce Lilly, Sony U.S.
  6444.        Karl London
  6445.        Motonori Nakamura, Ritsumeikan University & Kyoto University
  6446.        John Gardiner Myers, Carnegie Mellon University
  6447.        Neil Rickert, Northern Illinois University
  6448.        Eric Schnoebelen, Convex Computer Corp.
  6449.        Eric Wassenaar, National Institute for Nuclear and High Energy Physics, Amsterdam
  6450.        Christophe Wolfhugel, Pasteur Institute & Herve Schauer Consultants (Paris)
  6451.  
  6452.    I apologize for anyone I have omitted, misspelled, misat-
  6453.    tributed,  or otherwise missed.  At this point, I suspect
  6454.    that at least a hundred people have contributed code, and
  6455.    many  more  have contributed ideas, comments, and encour-
  6456.    agement.  I've tried to list them in the RELEASE_NOTES in
  6457.    the distribution directory.  I appreciate their contribu-
  6458.    tion as well.
  6459.  
  6460.         Special thanks are reserved for Michael Corrigan and
  6461.    Christophe  Wolfhugel, who besides being wonderful guinea
  6462.    pigs and contributors have also consented to be added  to
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee         SSMMMM::0088--110033
  6474.  
  6475.  
  6476.    the  ``sendmail@CS.Berkeley.EDU''  list and, by answering
  6477.    the bulk of the questions sent to that list,  have  freed
  6478.    me up to do other work.
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.                           AAPPPPEENNDDIIXX  AA
  6543.  
  6544.  
  6545.                       CCOOMMMMAANNDD LLIINNEE FFLLAAGGSS
  6546.  
  6547.  
  6548.  
  6549.  
  6550.      Arguments   must   be   presented   with  flags  before
  6551. addresses.  The flags are:
  6552.  
  6553. -b_x       Set operation mode to _x.  Operation modes are:
  6554.  
  6555.               m   Deliver mail (default)
  6556.               s   Speak SMTP on input side
  6557.               a   ``Arpanet'' mode (get envelope sender information from header)
  6558.               d   Run as a daemon
  6559.               t   Run in test mode
  6560.               v   Just verify addresses, don't collect or deliver
  6561.               i   Initialize the alias database
  6562.               p   Print the mail queue
  6563.  
  6564.  
  6565. -B_t_y_p_e    Indicate body type.
  6566.  
  6567. -C_f_i_l_e    Use a different configuration file.  _S_e_n_d_m_a_i_l runs
  6568.           as  the invoking user (rather than root) when this
  6569.           flag is specified.
  6570.  
  6571. -d_l_e_v_e_l   Set debugging level.
  6572.  
  6573. -f _a_d_d_r   The sender's machine address is _a_d_d_r.
  6574.  
  6575. -F_n_a_m_e    Sets the full name of this user to _n_a_m_e.
  6576.  
  6577. -h _c_n_t    Sets the "hop count" to _c_n_t.  This represents  the
  6578.           number of times this message has been processed by
  6579.           _s_e_n_d_m_a_i_l (to the extent that it  is  supported  by
  6580.           the underlying networks).  _C_n_t is incremented dur-
  6581.           ing processing, and if  it  reaches  MAXHOP  (cur-
  6582.           rently  30)  _s_e_n_d_m_a_i_l throws away the message with
  6583.           an error.
  6584.  
  6585. -n        Don't do aliasing or forwarding.
  6586.  
  6587. -r _a_d_d_r   An obsolete form of --ff.
  6588.  
  6589. -o_x_v_a_l_u_e  Set  option  _x  to  the  specified  _v_a_l_u_e.   These
  6590.           options are described in Appendix B.
  6591. ____________________
  6592.    Deprecated.
  6593.  
  6594.  
  6595.  
  6596.  
  6597. SSMMMM::0088--110044         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee         SSMMMM::0088--110055
  6606.  
  6607.  
  6608. -O_o_p_t_i_o_n==_v_a_l_u_e
  6609.           Set  _o_p_t_i_o_n  to the specified _v_a_l_u_e (for long form
  6610.           option names).
  6611.  
  6612. -M_x_v_a_l_u_e  _S_e_t _m_a_c_r_o _x _t_o _t_h_e _s_p_e_c_i_f_i_e_d _v_a_l_u_e_.
  6613.  
  6614. -p_p_r_o_t_o_c_o_l
  6615.           Set the sending protocol.  Programs are encouraged
  6616.           to  set  this.   The  protocol field can be in the
  6617.           form _p_r_o_t_o_c_o_l::_h_o_s_t to set both the sending  proto-
  6618.           col and sending host.  For example, "-pUUCP:uunet"
  6619.           sets the sending protocol to UUCP and the  sending
  6620.           host to uunet.  (Some existing programs use -oM to
  6621.           set the r and s  macros;  this  is  equivalent  to
  6622.           using -p.)
  6623.  
  6624. -q_t_i_m_e    Try to process the queued up mail.  If the time is
  6625.           given, a _s_e_n_d_m_a_i_l will run through  the  queue  at
  6626.           the  specified  interval  to  deliver queued mail;
  6627.           otherwise, it only runs once.
  6628.  
  6629. -q_X_s_t_r_i_n_g Run the queue once, limiting  the  jobs  to  those
  6630.           matching  _X_s_t_r_i_n_g.   The  key letter _X can be II to
  6631.           limit based on queue identifier, RR to limit  based
  6632.           on  recipient,  or  SS to limit based on sender.  A
  6633.           particular queued job is accepted if  one  of  the
  6634.           corresponding  addresses  contains  the  indicated
  6635.           _s_t_r_i_n_g.
  6636.  
  6637. -t        Read the  header  for  "To:",  "Cc:",  and  "Bcc:"
  6638.           lines, and send to everyone listed in those lists.
  6639.           The "Bcc:" line will be  deleted  before  sending.
  6640.           Any  addresses  in  the  argument  vector  will be
  6641.           deleted from the send list.
  6642.  
  6643. -X _l_o_g_f_i_l_e
  6644.           Log all traffic in and  out  of  _s_e_n_d_m_a_i_l  in  the
  6645.           indicated  _l_o_g_f_i_l_e  for debugging mailer problems.
  6646.           This produces a  lot  of  data  very  quickly  and
  6647.           should be used sparingly.
  6648.  
  6649.      There  are a number of options that may be specified as
  6650. primitive flags.  These are the e,  i,  m,  and  v  options.
  6651. Also, the f option may be specified as the --ss flag.
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.  
  6671.  
  6672.  
  6673.  
  6674.                         AAPPPPEENNDDIIXX  BB
  6675.  
  6676.  
  6677.                      QQUUEEUUEE FFIILLEE FFOORRMMAATTSS
  6678.  
  6679.  
  6680.  
  6681.  
  6682.      This  appendix describes the format of the queue files.
  6683. These files live in the directory defined by the QQ option in
  6684. the   _s_e_n_d_m_a_i_l_._c_f   file,   usually   _/_v_a_r_/_s_p_o_o_l_/_m_q_u_e_u_e   or
  6685. _/_u_s_r_/_s_p_o_o_l_/_m_q_u_e_u_e.
  6686.  
  6687.      All queue files have the name _xff_A_A_A_9_9_9_9_9 where _A_A_A_9_9_9_9_9
  6688. is  the  _i_d for this message and the _x is a type.  The first
  6689. letter of the id encodes the hour of the day that  the  mes-
  6690. sage  was  received  by  the  system  (with A being the hour
  6691. between midnight and 1:00AM).  All files with  the  same  id
  6692. collectively define one message.
  6693.  
  6694.      The types are:
  6695.  
  6696. d    The data file.  The message body (excluding the header)
  6697.      is kept in this file.
  6698.  
  6699. q    The queue control file.  This file contains the  infor-
  6700.      mation necessary to process the job.
  6701.  
  6702. t    A  temporary  file.   These are an image of the qqff file
  6703.      when it is being rebuilt.  It should be renamed to a qqff
  6704.      file very quickly.
  6705.  
  6706. x    A  transcript  file, existing during the life of a ses-
  6707.      sion showing everything that happens during  that  ses-
  6708.      sion.
  6709.  
  6710.      The  qqff  file  is  structured as a series of lines each
  6711. beginning with a code letter.  The lines are as follows:
  6712.  
  6713. V    The version number of the queue file  format,  used  to
  6714.      allow new _s_e_n_d_m_a_i_l binaries to read queue files created
  6715.      by older versions.  Defaults to version zero.  Must  be
  6716.      the first line of the file if present.
  6717.  
  6718. H    A  header definition.  There may be any number of these
  6719.      lines.  The order  is  important:  they  represent  the
  6720.      order  in the final message.  These use the same syntax
  6721.      as header definitions in the configuration file.
  6722.  
  6723. C    The    controlling    address.     The    syntax     is
  6724.      "localuser:aliasname".   Recipient  addresses following
  6725.      this line will be flagged so that  deliveries  will  be
  6726.      run  as the _l_o_c_a_l_u_s_e_r (a user name from the /etc/passwd
  6727.  
  6728.  
  6729. SSMMMM::0088--110066         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee         SSMMMM::0088--110077
  6738.  
  6739.  
  6740.      file); _a_l_i_a_s_n_a_m_e is the name of the alias that expanded
  6741.      to this address (used for printing messages).
  6742.  
  6743. Q    The  ``original  recipient'',  specified  by the ORCPT=
  6744.      field in an ESMTP transaction.   Used  exclusively  for
  6745.      Delivery  Status Notifications.  It applies only to the
  6746.      immediately following `R' line.
  6747.  
  6748. R    A recipient address.  This will normally be  completely
  6749.      aliased, but is actually realiased when the job is pro-
  6750.      cessed.  There will be one  line  for  each  recipient.
  6751.      Version  1  qf  files  also  include  a  leading colon-
  6752.      terminated list of flags, which can be `S' to return  a
  6753.      message  on  successful final delivery, `F' to return a
  6754.      message on failure, `D' to return a message if the mes-
  6755.      sage  is  delayed, `B' to indicate that the body should
  6756.      be returned, `N' to suppress returning  the  body,  and
  6757.      `P'  to  declare this as a ``primary'' (command line or
  6758.      SMTP-session) address.
  6759.  
  6760. S    The sender address.  There may only  be  one  of  these
  6761.      lines.
  6762.  
  6763. T    The job creation time.  This is used to compute when to
  6764.      time out the job.
  6765.  
  6766. P    The current message priority.  This is  used  to  order
  6767.      the  queue.  Higher numbers mean lower priorities.  The
  6768.      priority changes as the message sits in the queue.  The
  6769.      initial  priority  depends on the message class and the
  6770.      size of the message.
  6771.  
  6772. M    A message.  This line is printed by the _m_a_i_l_q  command,
  6773.      and  is generally used to store status information.  It
  6774.      can contain any text.
  6775.  
  6776. F    Flag bits, represented as one letter per flag.  Defined
  6777.      flag bits are rr indicating that this is a response mes-
  6778.      sage and ww indicating that a warning message  has  been
  6779.      sent announcing that the mail has been delayed.
  6780.  
  6781. N    The total number of delivery attempts.
  6782.  
  6783. K    The time (as seconds since January 1, 1970) of the last
  6784.      delivery attempt.
  6785.  
  6786. I    The i-number of the data file;  this  can  be  used  to
  6787.      recover  your mail queue after a disastrous disk crash.
  6788.  
  6789. $    A macro definition.  The values of certain  macros  (as
  6790.      of  this writing, only $$rr and $$ss) are passed through to
  6791.      the queue run phase.
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803. SSMMMM::0088--110088         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6804.  
  6805.  
  6806. B    The body type.  The remainder of the  line  is  a  text
  6807.      string  defining the body type.  If this field is miss-
  6808.      ing, the body type is assumed to be "undefined" and  no
  6809.      special  processing  is  attempted.   Legal  values are
  6810.      "7BIT" and "8BITMIME".
  6811.  
  6812. O    The original MTS value (from  the  ESMTP  transaction).
  6813.      For Deliver Status Notifications only.
  6814.  
  6815. Z    The  original envelope id (from the ESMTP transaction).
  6816.      For Deliver Status Notifications only.
  6817.  
  6818.      As an example, the following is a queue  file  sent  to
  6819. "eric@mammoth.Berkeley.EDU"                              and
  6820. "bostic@okeeffe.CS.Berkeley.EDU"1:
  6821.  
  6822.     P835771
  6823.     T404261372
  6824.     Seric
  6825.     Ceric:sendmail@vangogh.CS.Berkeley.EDU
  6826.     Reric@mammoth.Berkeley.EDU
  6827.     Rbostic@okeeffe.CS.Berkeley.EDU
  6828.     H?P?return-path: <owner-sendmail@vangogh.CS.Berkeley.EDU>
  6829.     Hreceived: by vangogh.CS.Berkeley.EDU (5.108/2.7) id AAA06703;
  6830.         Fri, 17 Jul 92 00:28:55 -0700
  6831.     Hreceived: from mail.CS.Berkeley.EDU by vangogh.CS.Berkeley.EDU (5.108/2.7)
  6832.         id AAA06698; Fri, 17 Jul 92 00:28:54 -0700
  6833.     Hreceived: from [128.32.31.21] by mail.CS.Berkeley.EDU (5.96/2.5)
  6834.         id AA22777; Fri, 17 Jul 92 03:29:14 -0400
  6835.     Hreceived: by foo.bar.baz.de (5.57/Ultrix3.0-C)
  6836.         id AA22757; Fri, 17 Jul 92 09:31:25 GMT
  6837.     H?F?from: eric@foo.bar.baz.de (Eric Allman)
  6838.     H?x?full-name: Eric Allman
  6839.     Hmessage-id: <9207170931.AA22757@foo.bar.baz.de>
  6840.     HTo: sendmail@vangogh.CS.Berkeley.EDU
  6841.     Hsubject: this is an example message
  6842.  
  6843. This shows the person who sent the message,  the  submission
  6844. time  (in seconds since January 1, 1970), the message prior-
  6845. ity, the message class, the recipients, and the headers  for
  6846. the message.
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853. ____________________
  6854.    1This example is contrived and  probably  inaccurate  for
  6855. your  environment.   Glance  over it to get an idea; nothing
  6856. can replace looking at what your own system generates.
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.  
  6872.                         AAPPPPEENNDDIIXX  CC
  6873.  
  6874.  
  6875.                   SSUUMMMMAARRYY OOFF SSUUPPPPOORRTT FFIILLEESS
  6876.  
  6877.  
  6878.  
  6879.  
  6880.      This  is  a  summary of the support files that _s_e_n_d_m_a_i_l
  6881. creates or generates.  Many of these can be changed by edit-
  6882. ing  the  sendmail.cf  file;  check there to find the actual
  6883. pathnames.
  6884.  
  6885. /usr/sbin/sendmail
  6886.           The binary of _s_e_n_d_m_a_i_l.
  6887.  
  6888. /usr/bin/newaliases
  6889.           A link to  /usr/sbin/sendmail;  causes  the  alias
  6890.           database  to  be rebuilt.  Running this program is
  6891.           completely equivalent to giving _s_e_n_d_m_a_i_l  the  --bbii
  6892.           flag.
  6893.  
  6894. /usr/bin/mailq
  6895.           Prints  a listing of the mail queue.  This program
  6896.           is equivalent to using the --bbpp flag to _s_e_n_d_m_a_i_l.
  6897.  
  6898. /etc/sendmail.cf
  6899.           The configuration file, in textual form.
  6900.  
  6901. /usr/lib/sendmail.hf
  6902.           The SMTP help file.
  6903.  
  6904. /etc/sendmail.st
  6905.           A statistics file; need not be present.
  6906.  
  6907. /etc/sendmail.pid
  6908.           Created in daemon mode; it contains the process id
  6909.           of  the  current  SMTP daemon.  If you use this in
  6910.           scripts; use ``head -1'' to  get  just  the  first
  6911.           line;  later versions of _s_e_n_d_m_a_i_l may add informa-
  6912.           tion to subsequent lines.
  6913.  
  6914. /etc/aliases
  6915.           The textual version of the alias file.
  6916.  
  6917. /etc/aliases.{pag,dir}
  6918.           The alias file in _d_b_m(3) format.
  6919.  
  6920. /var/spool/mqueue
  6921.           The directory in which the mail queue  and  tempo-
  6922.           rary files reside.
  6923.  
  6924.  
  6925.  
  6926.  
  6927. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee         SSMMMM::0088--110099
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935. SSMMMM::0088--111100         SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  6936.  
  6937.  
  6938. /var/spool/mqueue/qf*
  6939.           Control (queue) files for messages.
  6940.  
  6941. /var/spool/mqueue/df*
  6942.           Data files.
  6943.  
  6944. /var/spool/mqueue/tf*
  6945.           Temporary  versions  of  the qf files, used during
  6946.           queue file rebuild.
  6947.  
  6948. /var/spool/mqueue/xf*
  6949.           A transcript of the current session.
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962.  
  6963.  
  6964.  
  6965.  
  6966.  
  6967.  
  6968.  
  6969.  
  6970.  
  6971.  
  6972.  
  6973.  
  6974.  
  6975.  
  6976.  
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001. SSMMMM::0088--22           SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.                  This page intentionally left blank;
  7022.           replace it with a blank sheet for double-sided output.
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee           SSMMMM::0088--33
  7068.  
  7069.  
  7070.                           TABLE OF CONTENTS
  7071.  
  7072. 1.  BASIC INSTALLATION ................................    7
  7073.    1.1.  Compiling Sendmail ...........................    7
  7074.       1.1.1.  Tweaking the Makefile ...................    7
  7075.       1.1.2.  Compilation and installation ............    8
  7076.    1.2.  Configuration Files ..........................    9
  7077.    1.3.  Details of Installation Files ................   11
  7078.       1.3.1.  /usr/sbin/sendmail ......................   11
  7079.       1.3.2.  /etc/sendmail.cf ........................   12
  7080.       1.3.3.  /usr/bin/newaliases .....................   12
  7081.       1.3.4.  /var/spool/mqueue .......................   12
  7082.       1.3.5.  /etc/aliases* ...........................   12
  7083.       1.3.6.  /etc/rc .................................   13
  7084.       1.3.7.  /usr/lib/sendmail.hf ....................   15
  7085.       1.3.8.  /etc/sendmail.st ........................   15
  7086.       1.3.9.  /usr/bin/mailq ..........................   15
  7087. 2.  NORMAL OPERATIONS .................................   15
  7088.    2.1.  The System Log ...............................   15
  7089.       2.1.1.  Format ..................................   15
  7090.       2.1.2.  Levels ..................................   17
  7091.    2.2.  Dumping State ................................   17
  7092.    2.3.  The Mail Queue ...............................   17
  7093.       2.3.1.  Printing the queue ......................   18
  7094.       2.3.2.  Forcing the queue .......................   18
  7095.    2.4.  The Service Switch ...........................   19
  7096.    2.5.  The Alias Database ...........................   20
  7097.       2.5.1.  Rebuilding the alias database ...........   21
  7098.       2.5.2.  Potential problems ......................   22
  7099.       2.5.3.  List owners .............................   22
  7100.    2.6.  User Information Database ....................   23
  7101.    2.7.  Per-User Forwarding (.forward Files) .........   23
  7102.    2.8.  Special Header Lines .........................   23
  7103.       2.8.1.  Errors-To: ..............................   24
  7104.       2.8.2.  Apparently-To: ..........................   24
  7105.       2.8.3.  Precedence ..............................   24
  7106.    2.9.  IDENT Protocol Support .......................   24
  7107. 3.  ARGUMENTS .........................................   25
  7108.    3.1.  Queue Interval ...............................   26
  7109.    3.2.  Daemon Mode ..................................   26
  7110.    3.3.  Forcing the Queue ............................   26
  7111.    3.4.  Debugging ....................................   27
  7112.    3.5.  Changing the Values of Options ...............   27
  7113.    3.6.  Trying a Different Configuration File ........   28
  7114.    3.7.  Logging Traffic ..............................   28
  7115.    3.8.  Testing Configuration Files ..................   28
  7116. 4.  TUNING ............................................   30
  7117.    4.1.  Timeouts .....................................   30
  7118.       4.1.1.  Queue interval ..........................   30
  7119.       4.1.2.  Read timeouts ...........................   30
  7120.       4.1.3.  Message timeouts ........................   32
  7121.    4.2.  Forking During Queue Runs ....................   33
  7122.    4.3.  Queue Priorities .............................   33
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133. SSMMMM::0088--44           SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee
  7134.  
  7135.  
  7136.    4.4.  Load Limiting ................................   34
  7137.    4.5.  Delivery Mode ................................   35
  7138.    4.6.  Log Level ....................................   35
  7139.    4.7.  File Modes ...................................   36
  7140.       4.7.1.  To suid or not to suid?  ................   36
  7141.       4.7.2.  Should my alias database be  writable?
  7142.          ..............................................   37
  7143.    4.8.  Connection Caching ...........................   37
  7144.    4.9.  Name Server Access ...........................   38
  7145.    4.10.  Moving the Per-User Forward Files ...........   39
  7146.    4.11.  Free Space ..................................   40
  7147.    4.12.  Maximum Message Size ........................   40
  7148.    4.13.  Privacy Flags ...............................   40
  7149.    4.14.  Send to Me Too ..............................   41
  7150. 5.  THE WHOLE SCOOP ON THE CONFIGURATION FILE .........   41
  7151.    5.1.  R and S -- Rewriting Rules ...................   41
  7152.       5.1.1.  The left hand side ......................   42
  7153.       5.1.2.  The right hand side .....................   43
  7154.       5.1.3.  Semantics of rewriting rule sets ........   45
  7155.       5.1.4.  IPC mailers .............................   46
  7156.    5.2.  D -- Define Macro ............................   47
  7157.    5.3.  C and F -- Define Classes ....................   51
  7158.    5.4.  M -- Define Mailer ...........................   53
  7159.    5.5.  H -- Define Header ...........................   58
  7160.    5.6.  O -- Set Option ..............................   59
  7161.    5.7.  P -- Precedence Definitions ..................   73
  7162.    5.8.  V -- Configuration Version Level .............   73
  7163.    5.9.  K -- Key File Declaration ....................   75
  7164.    5.10.  The User Database ...........................   80
  7165.       5.10.1.  Structure of the user database .........   80
  7166.       5.10.2.  User database semantics ................   81
  7167.       5.10.3.  Creating the database21 ................   82
  7168. 6.  OTHER CONFIGURATION ...............................   83
  7169.    6.1.  Parameters in src/Makefile ...................   83
  7170.    6.2.  Parameters in src/conf.h .....................   84
  7171.    6.3.  Configuration in src/conf.c ..................   88
  7172.       6.3.1.  Built-in Header Semantics ...............   88
  7173.       6.3.2.  Restricting Use of Email ................   91
  7174.       6.3.3.  Load Average Computation ................   92
  7175.       6.3.4.  New Database Map Classes ................   92
  7176.       6.3.5.  Queueing Function .......................   92
  7177.       6.3.6.  Refusing Incoming SMTP Connections ......   93
  7178.       6.3.7.  Load Average Computation ................   94
  7179.    6.4.  Configuration in src/daemon.c ................   94
  7180. 7.  CHANGES IN VERSION 8 ..............................   94
  7181.    7.1.  Connection Caching ...........................   94
  7182.    7.2.  MX Piggybacking ..............................   94
  7183.    7.3.  RFC 1123 Compliance ..........................   94
  7184.    7.4.  Extended SMTP Support ........................   95
  7185.    7.5.  Eight-Bit Clean ..............................   95
  7186.    7.6.  User Database ................................   95
  7187.    7.7.  Improved BIND Support ........................   96
  7188.    7.8.  Keyed Files ..................................   96
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199. SSeennddmmaaiill IInnssttaallllaattiioonn aanndd OOppeerraattiioonn GGuuiiddee           SSMMMM::0088--55
  7200.  
  7201.  
  7202.    7.9.  Multi-Word Classes ...........................   96
  7203.    7.10.  Deferred Macro Expansion ....................   96
  7204.    7.11.  IDENT Protocol Support ......................   96
  7205.    7.12.  Parsing Bug Fixes ...........................   96
  7206.    7.13.  Separate Envelope/Header Processing .........   96
  7207.    7.14.  Owner-List Propagates to Envelope ...........   97
  7208.    7.15.  Dynamic Header Allocation ...................   97
  7209.    7.16.  New Command Line Flags ......................   97
  7210.    7.17.  Enhanced Command Line Flags .................   97
  7211.    7.18.  New and Old Configuration Line Types ........   97
  7212.    7.19.  New Options .................................   98
  7213.    7.20.  Extended Options ............................   98
  7214.    7.21.  New Mailer Flags ............................   99
  7215.    7.22.  Long Option Names ...........................   99
  7216.    7.23.  New Pre-Defined Macros ......................  100
  7217.    7.24.  New LHS Token ...............................  100
  7218.    7.25.  Bigger Defaults .............................  100
  7219.    7.26.  Different Default Tuning Parameters .........  100
  7220.    7.27.  Auto-Quoting in Addresses ...................  100
  7221.    7.28.  Symbolic Names On Error Mailer ..............  100
  7222.    7.29.  SMTP VRFY Doesn't Expand ....................  100
  7223.    7.30.  [IPC] Mailers Allow Multiple Hosts ..........  101
  7224.    7.31.  Aliases Extended ............................  101
  7225.    7.32.  Portability and Security Enhancements .......  101
  7226.    7.33.  Miscellaneous Changes .......................  101
  7227. 8.  ACKNOWLEDGEMENTS ..................................  102
  7228. Appendix A.  COMMAND LINE FLAGS .......................  104
  7229. Appendix B.  QUEUE FILE FORMATS .......................  106
  7230. Appendix C.  SUMMARY OF SUPPORT FILES .................  109
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.